Skip to content

Commit

Permalink
fix: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyotato committed Apr 1, 2024
1 parent 9f7ba57 commit 9c2112b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/mypage/@info/components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { useDisclosure } from '@mantine/hooks';
import { notifications } from '@mantine/notifications';
import { IconCheck } from '@tabler/icons-react';
import { useQuery } from '@tanstack/react-query';
import { useRouter } from 'next/navigation';
import { JWT } from 'next-auth/jwt';
import { useSession } from 'next-auth/react';
import { useRouter } from 'next/navigation';
import { useEffect, useState } from 'react';

import ProfileSkeleton from '@/components/shared/ProfileSkeleton';
Expand Down
2 changes: 1 addition & 1 deletion src/app/roadmap/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { Box, Drawer, ScrollArea } from '@mantine/core';
import { IconCircleChevronRight } from '@tabler/icons-react';
import { useSession } from 'next-auth/react';
import { useRouter } from 'next/navigation';
import { useSession } from 'next-auth/react';
import { useState } from 'react';
import { Edge, Node, ReactFlowProvider } from 'reactflow';

Expand Down
2 changes: 1 addition & 1 deletion src/app/roadmap/post/[...id]/@roadmapInfo/Likes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Box, Title } from '@mantine/core';
import { notifications } from '@mantine/notifications';
import { IconCheck, IconExclamationMark, IconHeart } from '@tabler/icons-react';
import { useQueryClient } from '@tanstack/react-query';
import { useParams } from 'next/navigation';
import { JWT } from 'next-auth/jwt';
import { signOut, useSession } from 'next-auth/react';
import { useParams } from 'next/navigation';
import { PropsWithChildren, useState } from 'react';

import { apiRoutes, fail, IS_PROD, siteRoutes, warning } from '@/constants';
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/layouts/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { modals } from '@mantine/modals';
import { IconExclamationCircle } from '@tabler/icons-react';
import { useSession } from 'next-auth/react';

import OverLay from '../Overlay';
import Header from './components/Header';
import OverLay from '../Overlay';

const PageHeader = () => {
const { status } = useSession();
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/layouts/components/AuthButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import { Button, Group } from '@mantine/core';
import { signIn, signOut, useSession } from 'next-auth/react';
import { usePathname, useRouter } from 'next/navigation';
import { signIn, signOut, useSession } from 'next-auth/react';

const AuthButton = ({
openModal,
Expand All @@ -26,6 +26,7 @@ const AuthButton = ({
closeDrawer();
signOut({ callbackUrl: '/' });
});
closeDrawer();
}
}}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/layouts/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {
} from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { IconHome, IconUser } from '@tabler/icons-react';
import { useSession } from 'next-auth/react';
import { usePathname, useRouter } from 'next/navigation';

import { useSession } from 'next-auth/react';
import { useMemo } from 'react';

import AuthButton from './AuthButton';
import HeaderAuthButton from './HeaderAuthButton';
import RoadmapCreateButton from './RoadmapCreateButton';
Expand Down
6 changes: 4 additions & 2 deletions src/components/shared/layouts/components/HeaderAuthButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';
import { Group, UnstyledButton } from '@mantine/core';
import { IconLogout, IconUser, IconWriting } from '@tabler/icons-react';
import { signIn, signOut, useSession } from 'next-auth/react';
import { usePathname, useRouter } from 'next/navigation';
import { signIn, signOut, useSession } from 'next-auth/react';
import { useEffect } from 'react';

const HeaderAuthButton = ({
Expand All @@ -15,9 +15,11 @@ const HeaderAuthButton = ({
const { data: session } = useSession();
const router = useRouter();
const pathName = usePathname();

useEffect(() => {
closeDrawer();
}, []);
}, [closeDrawer]);

if (session) {
return (
<Group justify='center' visibleFrom='sm'>
Expand Down

0 comments on commit 9c2112b

Please sign in to comment.