Skip to content

Commit 8f2494e

Browse files
committed
refactor: 화살표 함수로 변경
1 parent a650c38 commit 8f2494e

13 files changed

Lines changed: 59 additions & 33 deletions

app/not-found.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from 'next/link';
22

3-
export default function NotFound() {
3+
const NotFound = () => {
44
return (
55
<main className="bg-background flex min-h-screen flex-col items-center justify-center px-4">
66
<h1 className="text-7xl font-extrabold text-gray-900">404</h1>
@@ -14,4 +14,6 @@ export default function NotFound() {
1414
</Link>
1515
</main>
1616
);
17-
}
17+
};
18+
19+
export default NotFound;

app/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { LandingHeader } from '@/components/landing/LandingHeader';
2-
import { HeroSection } from '@/components/landing/HeroSection';
3-
import { FeatureList } from '@/components/landing/FeatureList';
4-
import { LandingPreview } from '@/components/landing/LandingPreview';
1+
import LandingHeader from '@/components/landing/LandingHeader';
2+
import HeroSection from '@/components/landing/HeroSection';
3+
import FeatureList from '@/components/landing/FeatureList';
4+
import LandingPreview from '@/components/landing/LandingPreview';
5+
56
export default function Home() {
67
return (
78
<div className="bg-background h-full space-y-60">

components/auth/AuthCard.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type Props = {
66
children: React.ReactNode;
77
};
88

9-
export function AuthCard({ title, description, children }: Props) {
9+
const AuthCard = ({ title, description, children }: Props) => {
1010
return (
1111
<div className="flex h-screen w-screen -translate-y-6 flex-col items-center justify-center">
1212
<Link
@@ -24,4 +24,6 @@ export function AuthCard({ title, description, children }: Props) {
2424
</div>
2525
</div>
2626
);
27-
}
27+
};
28+
29+
export default AuthCard;

components/auth/Button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ type ButtonProps = {
99
onClick?: () => void;
1010
};
1111

12-
export function Button({
12+
const Button = ({
1313
children,
1414
variant = 'primary',
1515
className,
1616
type = 'button',
1717
onClick,
18-
}: ButtonProps) {
18+
}: ButtonProps) => {
1919
return (
2020
<button
2121
type={type}
@@ -35,4 +35,6 @@ export function Button({
3535
{children}
3636
</button>
3737
);
38-
}
38+
};
39+
40+
export default Button;

components/auth/FindPasswordModal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use client';
22

33
import { useEffect, useRef, useState } from 'react';
4-
import { Button } from './Button';
5-
import { FormField } from './FormField';
4+
import Button from './Button';
5+
import FormField from './FormField';
66

77
type FindPasswordModalProps = {
88
onClose: () => void;
99
};
1010

11-
export function FindPasswordModal({ onClose }: FindPasswordModalProps) {
11+
const FindPasswordModal = ({ onClose }: FindPasswordModalProps) => {
1212
// 이메일 state
1313
const [email, setEmail] = useState('');
1414
const emailInputRef = useRef<HTMLInputElement>(null);
@@ -88,4 +88,6 @@ export function FindPasswordModal({ onClose }: FindPasswordModalProps) {
8888
</div>
8989
</div>
9090
);
91-
}
91+
};
92+
93+
export default FindPasswordModal;

components/auth/FormField.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type FieldProps = {
99
const inputClass =
1010
'border-border placeholder:text-muted hover:border-border-hover focus:border-border-focus focus:ring-border-focus h-10 w-full rounded-md border px-3 text-sm transition-colors focus:ring-1 focus:outline-none';
1111

12-
export const FormField = forwardRef<HTMLInputElement, FieldProps>(
12+
const FormField = forwardRef<HTMLInputElement, FieldProps>(
1313
({ id, label, type = 'text', ...rest }, ref) => {
1414
return (
1515
<div className="space-y-1">
@@ -23,3 +23,5 @@ export const FormField = forwardRef<HTMLInputElement, FieldProps>(
2323
);
2424

2525
FormField.displayName = 'FormField';
26+
27+
export default FormField;

components/auth/SignupForm.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { FormField } from '@/components/auth/FormField';
1+
import FormField from '@/components/auth/FormField';
22
import Link from 'next/link';
33

4-
export function SignupForm() {
4+
const SignupForm = () => {
55
return (
66
<>
77
<div className="space-y-6">
@@ -26,4 +26,6 @@ export function SignupForm() {
2626
</p>
2727
</>
2828
);
29-
}
29+
};
30+
31+
export default SignupForm;

components/landing/FeatureCard.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type FeatureCardProps = {
44
title: string;
55
description: string;
66
};
7-
export function FeatureCard({ title, description, icon }: FeatureCardProps) {
7+
const FeatureCard = ({ title, description, icon }: FeatureCardProps) => {
88
return (
99
<div className="rounded-xl bg-white p-6 pb-2 shadow-sm">
1010
<div className="mb-2">
@@ -17,4 +17,6 @@ export function FeatureCard({ title, description, icon }: FeatureCardProps) {
1717
<p className="text-muted mt-2 text-left text-sm">{description}</p>
1818
</div>
1919
);
20-
}
20+
};
21+
22+
export default FeatureCard;

components/landing/FeatureContent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ITEMS = [
1919
},
2020
];
2121

22-
export function FeatureContent() {
22+
const FeatureContent = () => {
2323
return (
2424
<ul className="space-y-6">
2525
{ITEMS.map((item) => (
@@ -35,4 +35,6 @@ export function FeatureContent() {
3535
))}
3636
</ul>
3737
);
38-
}
38+
};
39+
40+
export default FeatureContent;

components/landing/FeatureList.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FeatureCard } from '@/components/landing/FeatureCard';
1+
import FeatureCard from '@/components/landing/FeatureCard';
22
import {
33
FiBookOpen,
44
FiTarget,
@@ -31,7 +31,7 @@ const FEATURES = [
3131
'GitHub 스타일 잔디 그래프로 학습 활동을 한눈에 확인하고 동기부여를 받아보세요.',
3232
},
3333
];
34-
export function FeatureList() {
34+
const FeatureList = () => {
3535
return (
3636
<div className="flex h-full flex-col items-center justify-center space-y-3 text-center">
3737
<p className="bg-surface-alt rounded-mg mt-16 rounded-lg p-1 px-4 text-xs">
@@ -49,4 +49,6 @@ export function FeatureList() {
4949
</div>
5050
</div>
5151
);
52-
}
52+
};
53+
54+
export default FeatureList;

0 commit comments

Comments
 (0)