import { RotateCw, Image } from "lucide-react"; import { ActionIcon, Tooltip } from "@mantine/core"; import { useStore } from "../lib/states"; const Header = () => { const [ file, isInpainting, model, setFile, runInpainting, showPrevMask, hidePrevMask, ] = useStore((state) => [ state.file, state.isInpainting, state.settings.model, state.setFile, state.runInpainting, state.showPrevMask, state.hidePrevMask, ]); const handleRerunLastMask = () => { runInpainting(); }; const onRerunMouseEnter = () => { showPrevMask(); }; const onRerunMouseLeave = () => { hidePrevMask(); }; return (
{ const newFile = ev.currentTarget.files?.[0]; if (newFile) { setFile(newFile); } }} accept="image/png, image/jpeg" /> {file && !model.need_prompt ? (
) : ( <> )}
); }; export default Header;