Skip to content

Commit fdeb401

Browse files
committed
refactor: function 선언을 화살표 함수로 변환
1 parent 2f73919 commit fdeb401

20 files changed

Lines changed: 62 additions & 40 deletions

src/app/layout/MainLayout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Header } from '@shared/ui/Header';
22
import { Outlet } from 'react-router';
33

4-
export default function MainLayout() {
4+
const MainLayout = () => {
55
return (
66
<div className="min-h-screen bg-white">
77
<Header />
88
<Outlet />
99
</div>
1010
);
11-
}
11+
};
12+
13+
export default MainLayout;

src/app/providers/ToastProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface ToastProviderProps {
2222
children: ReactNode;
2323
}
2424

25-
export function ToastProvider({ children }: ToastProviderProps) {
25+
export const ToastProvider = ({ children }: ToastProviderProps) => {
2626
const { contextValue, isVisible, isAnimating, toastProps } = useToastProvider();
2727

2828
return (
@@ -37,4 +37,4 @@ export function ToastProvider({ children }: ToastProviderProps) {
3737
)}
3838
</ToastContext.Provider>
3939
);
40-
}
40+
};

src/app/providers/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ type AppProvidersProps = {
55
children: ReactNode;
66
};
77

8-
export function AppProviders({ children }: AppProvidersProps) {
8+
export const AppProviders = ({ children }: AppProvidersProps) => {
99
return <ToastProvider>{children}</ToastProvider>;
10-
}
10+
};

src/app/root.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const links = () => [
1111
{ rel: 'manifest', href: '/site.webmanifest' },
1212
];
1313

14-
export default function Root() {
14+
const Root = () => {
1515
return (
1616
<html lang="ko">
1717
<head>
@@ -30,4 +30,6 @@ export default function Root() {
3030
</body>
3131
</html>
3232
);
33-
}
33+
};
34+
35+
export default Root;

src/pages/login/ui/LoginPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { kakaoLoginImg } from '@shared/assets/icons';
33
import { Logo } from '@shared/ui/Logo';
44
import { loginStyles as s } from './LoginPage.styles';
55

6-
export default function LoginPage() {
6+
const LoginPage = () => {
77
return (
88
<div className={s.wrapper} style={{ backgroundImage: `url(${loginBackgroundImg})` }}>
99
<div className="flex h-full w-full flex-col items-center justify-center gap-[26px] px-6 py-12">
@@ -19,4 +19,6 @@ export default function LoginPage() {
1919
</div>
2020
</div>
2121
);
22-
}
22+
};
23+
24+
export default LoginPage;

src/pages/main/ui/MainPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useNavigate } from 'react-router';
77
import { BANNER_CARDS } from './BannerCards';
88
import { CAROUSEL_SLIDES } from './CarouselSlides';
99

10-
export default function MainPage() {
10+
const MainPage = () => {
1111
const navigate = useNavigate();
1212

1313
return (
@@ -36,4 +36,6 @@ export default function MainPage() {
3636
/>
3737
</main>
3838
);
39-
}
39+
};
40+
41+
export default MainPage;

src/pages/mypage/ui/AccountSettingsPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useNavigate } from 'react-router';
66
import { PageContainer } from './PageContainer';
77
import { getProfileSummary, saveProfile } from '../model/profileStorage';
88

9-
export default function AccountSettingsPage() {
9+
const AccountSettingsPage = () => {
1010
const navigate = useNavigate();
1111
const profileSummary = getProfileSummary();
1212
const [profileImage, setProfileImage] = useState(profileSummary.profileImage ?? MY_PAGE_PROFILE.profileImage);
@@ -80,4 +80,6 @@ export default function AccountSettingsPage() {
8080
</PageContainer>
8181
</main>
8282
);
83-
}
83+
};
84+
85+
export default AccountSettingsPage;

src/pages/mypage/ui/MyPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MAIN_TABS: Array<MyPageTab<MainTabId>> = [
1515
{ id: 'favorite', label: '찜한 목록' },
1616
];
1717

18-
export default function MyPage() {
18+
const MyPage = () => {
1919
const navigate = useNavigate();
2020
const profileSummary = getProfileSummary();
2121

@@ -104,4 +104,6 @@ export default function MyPage() {
104104
</PageContainer>
105105
</main>
106106
);
107-
}
107+
};
108+
109+
export default MyPage;

src/pages/mypage/ui/ProfileInfoPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { PageContainer } from './PageContainer';
44
import { PersonalInfoForm } from './PersonalInfoForm';
55
import { getPersonalInfoDefaults, saveProfile } from '../model/profileStorage';
66

7-
export default function ProfileInfoPage() {
7+
const ProfileInfoPage = () => {
88
const navigate = useNavigate();
99
const defaultValues = useMemo(() => getPersonalInfoDefaults(), []);
1010

@@ -22,4 +22,6 @@ export default function ProfileInfoPage() {
2222
</PageContainer>
2323
</main>
2424
);
25-
}
25+
};
26+
27+
export default ProfileInfoPage;

src/pages/sell-confirm/ui/SellConfirmPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const CONDITION_LABELS = {
2020

2121
type SellConfirmState = SellState;
2222

23-
export default function SellConfirmPage() {
23+
const SellConfirmPage = () => {
2424
const location = useLocation();
2525
const navigate = useNavigate();
2626
const { showToast } = useToast();
@@ -129,4 +129,6 @@ export default function SellConfirmPage() {
129129
</div>
130130
</div>
131131
);
132-
}
132+
};
133+
134+
export default SellConfirmPage;

0 commit comments

Comments
 (0)