mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
Convert useModified into a real hook.
This commit is contained in:
parent
a426c242cb
commit
91e3dff7f5
24 changed files with 63 additions and 48 deletions
|
|
@ -1,14 +1,14 @@
|
|||
import { Button, Modal, ModalTrigger, ActionForm, useToasts } from 'react-basics';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import { useMessages, useModified } from 'components/hooks';
|
||||
import WebsiteDeleteForm from './WebsiteDeleteForm';
|
||||
import WebsiteResetForm from './WebsiteResetForm';
|
||||
import { touch } from 'store/modified';
|
||||
|
||||
export function WebsiteData({ websiteId, onSave }: { websiteId: string; onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const router = useRouter();
|
||||
const { showToast } = useToasts();
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleReset = async () => {
|
||||
showToast({ message: formatMessage(messages.saved), variant: 'success' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue