mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +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,11 +1,11 @@
|
|||
import { Button, Icon, Text, Modal, Icons, ModalTrigger, useToasts } from 'react-basics';
|
||||
import UserAddForm from './UserAddForm';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import { touch } from 'store/modified';
|
||||
import { useMessages, useModified } from 'components/hooks';
|
||||
|
||||
export function UserAddButton({ onSave }: { onSave?: () => void }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { showToast } = useToasts();
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleSave = () => {
|
||||
showToast({ message: formatMessage(messages.saved), variant: 'success' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue