import { useState } from 'react'; import { Modal, OnSubmit, ModalType, openModal } from '@@/modals'; import { Button } from '@@/buttons'; import { SwitchField } from '@@/form-components/SwitchField'; import { TextTip } from '@@/Tip/TextTip'; interface Props { onSubmit: OnSubmit<{ pullLatest: boolean }>; cannotPullImage: boolean; } function ConfirmRecreationModal({ onSubmit, cannotPullImage }: Props) { const [pullLatest, setPullLatest] = useState(false); return ( onSubmit()} aria-label="confirm recreate container modal" >

You're about to recreate this container and any non-persisted data will be lost. This container will be removed and another one will be created using the same configuration.

{cannotPullImage && (
Cannot re-pull as the image is inaccessible - either it no longer exists or the tag or name is no longer correct.
)}
); } export async function confirmContainerRecreation(cannotPullImage: boolean) { return openModal(ConfirmRecreationModal, { cannotPullImage, }); }