Convert useModified into a real hook.
This commit is contained in:
1 parent
a426c242cb
commit
91e3dff7f5
24 files changed
+63
-48
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user