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