mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 18:45:36 +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,7 +1,6 @@
|
|||
import { useLocale, useLogin, useMessages } from 'components/hooks';
|
||||
import { useLocale, useLogin, useMessages, useModified } from 'components/hooks';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Button, Icon, Icons, Modal, ModalTrigger, Text } from 'react-basics';
|
||||
import { touch } from 'store/modified';
|
||||
import TeamDeleteForm from './TeamLeaveForm';
|
||||
|
||||
export function TeamLeaveButton({ teamId, teamName }: { teamId: string; teamName: string }) {
|
||||
|
|
@ -9,6 +8,7 @@ export function TeamLeaveButton({ teamId, teamName }: { teamId: string; teamName
|
|||
const router = useRouter();
|
||||
const { dir } = useLocale();
|
||||
const { user } = useLogin();
|
||||
const { touch } = useModified();
|
||||
|
||||
const handleLeave = async () => {
|
||||
touch('teams');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue