import { Button, Card, Group, Stack, Text } from '@mantine/core'; import { useMutationAPI } from 'hooks'; function DeleteBackground({ fileName, setFileName, inUseBackgrounds, setBackground, setNewFileName, setConfirm, }: { fileName: string; setFileName: (searchValue: string) => void; inUseBackgrounds: string[]; setBackground: React.Dispatch>; setNewFileName: (searchValue: string) => void; setConfirm: (value: boolean) => void; }) { const { mutateAsync } = useMutationAPI(); return ( Are you sure you want to delete {fileName}? {inUseBackgrounds.includes(fileName) && ( This background is currently in use! This will result in a blank background on the theme. )} THIS ACTION CANNOT BE UNDONE!!! ); } export default DeleteBackground;