Skip to content

Commit

Permalink
added client
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel2231 committed May 22, 2024
1 parent 183d42d commit 83b1c95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/(main)/account/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import { AccountProfile } from '@/components/account/account-profile';
import { AccountProfileDetails } from '@/components/account/account-profile-details';
import { useEffect, useState } from 'react';
import axiosInterceptorInstance from '../../../../axios/axiosInterceptorInstance';
import { useRecoilState } from 'recoil';
import { UserState } from '@/utils/recoil/atoms';

const Account = () => {
const [username, setUsername] = useState('');
const [user, setUser] = useRecoilState(UserState);
const [clubData, setClubData] = useState(null);

useEffect(() => {
setUsername(localStorage.getItem('username'));
axiosInterceptorInstance
.get(`/club/my`)
.then((res) => {
Expand Down Expand Up @@ -57,7 +58,7 @@ const Account = () => {
<Typography variant="h4">
<b style={{ color: '#80A4FF' }}>
{'[ '}
{username ? username : '동아리'}
{user.name ? user.name : '동아리'}
{' ] '}
</b>
정보 수정
Expand Down
2 changes: 2 additions & 0 deletions src/components/common/side-nav.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import Link from 'next/link';
import { usePathname } from 'next/navigation';
import LogoutIcon from '@mui/icons-material/Logout';
Expand Down
2 changes: 2 additions & 0 deletions src/layouts/mainLayout.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useCallback, useEffect, useState } from 'react';
import { usePathname } from 'next/navigation';
import { styled } from '@mui/material/styles';
Expand Down

0 comments on commit 83b1c95

Please sign in to comment.