Skip to content

Commit aedbb6f

Browse files
박승범박승범
authored andcommitted
용어사전 기능 추가
1 parent d13258e commit aedbb6f

35 files changed

Lines changed: 10983 additions & 2911 deletions

File tree

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"extends": [
3+
"next/core-web-vitals",
4+
"prettier"
5+
],
6+
"plugins": ["prettier"],
7+
"rules": {
8+
"prettier/prettier": "error",
9+
"react/react-in-jsx-scope": "off",
10+
"react/prop-types": "off",
11+
"no-unused-vars": "warn",
12+
"no-console": "warn",
13+
"react-hooks/rules-of-hooks": "error",
14+
"react-hooks/exhaustive-deps": "warn"
15+
},
16+
"env": {
17+
"browser": true,
18+
"es2021": true,
19+
"node": true
20+
}
21+
}

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"semi": false,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "auto",
11+
"jsxSingleQuote": false,
12+
"jsxBracketSameLine": false
13+
}
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
import type React from "react"
44

55
import { useState } from "react"
6+
import { useRouter } from "next/navigation"
67
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
78
import { Button } from "@/components/ui/button"
89
import { Input } from "@/components/ui/input"
910
import { Label } from "@/components/ui/label"
1011
import { Separator } from "@/components/ui/separator"
1112
import { TrendingUp, Eye, EyeOff, ArrowLeft } from "lucide-react"
1213

13-
interface LoginPageProps {
14-
onNavigate: (page: string) => void
15-
}
16-
17-
export default function LoginPage({ onNavigate }: LoginPageProps) {
14+
export default function LoginPage() {
15+
const router = useRouter()
1816
const [showPassword, setShowPassword] = useState(false)
1917
const [formData, setFormData] = useState({
2018
email: "",
@@ -33,13 +31,13 @@ export default function LoginPage({ onNavigate }: LoginPageProps) {
3331
e.preventDefault()
3432
// 로그인 로직 구현
3533
console.log("로그인 시도:", formData)
36-
onNavigate("dashboard")
34+
router.push("/dashboard")
3735
}
3836

3937
const handleKakaoLogin = () => {
40-
// 카카오 로그인 로직 구현
41-
console.log("카카오 로그인 시도")
42-
onNavigate("dashboard")
38+
// 카카오 OAuth URL로 리다이렉트
39+
const kakaoAuthUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${process.env.NEXT_PUBLIC_KAKAO_CLIENT_ID}&redirect_uri=${encodeURIComponent(process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI || '')}&response_type=code`
40+
window.location.href = kakaoAuthUrl
4341
}
4442

4543
return (
@@ -48,7 +46,7 @@ export default function LoginPage({ onNavigate }: LoginPageProps) {
4846
{/* Header */}
4947
<div className="text-center mb-8">
5048
<button
51-
onClick={() => onNavigate("dashboard")}
49+
onClick={() => router.push("/")}
5250
className="inline-flex items-center text-blue-600 hover:text-blue-800 mb-4"
5351
>
5452
<ArrowLeft className="w-4 h-4 mr-2" />
@@ -149,7 +147,7 @@ export default function LoginPage({ onNavigate }: LoginPageProps) {
149147

150148
<div className="text-center">
151149
<span className="text-gray-600">아직 계정이 없으신가요? </span>
152-
<button onClick={() => onNavigate("signup")} className="text-blue-600 hover:text-blue-800 font-medium">
150+
<button onClick={() => router.push("/signup")} className="text-blue-600 hover:text-blue-800 font-medium">
153151
회원가입
154152
</button>
155153
</div>
@@ -163,4 +161,4 @@ export default function LoginPage({ onNavigate }: LoginPageProps) {
163161
</div>
164162
</div>
165163
)
166-
}
164+
}
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import type React from "react"
44

55
import { useState } from "react"
6+
import { useRouter } from "next/navigation"
67
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
78
import { Button } from "@/components/ui/button"
89
import { Input } from "@/components/ui/input"
@@ -12,11 +13,8 @@ import { Progress } from "@/components/ui/progress"
1213
import { Badge } from "@/components/ui/badge"
1314
import { TrendingUp, Eye, EyeOff, ArrowLeft, Check, User, Target, BookOpen } from "lucide-react"
1415

15-
interface SignupPageProps {
16-
onNavigate: (page: string) => void
17-
}
18-
19-
export default function SignupPage({ onNavigate }: SignupPageProps) {
16+
export default function SignupPage() {
17+
const router = useRouter()
2018
const [currentStep, setCurrentStep] = useState(1)
2119
const [showPassword, setShowPassword] = useState(false)
2220
const [showConfirmPassword, setShowConfirmPassword] = useState(false)
@@ -64,7 +62,7 @@ export default function SignupPage({ onNavigate }: SignupPageProps) {
6462

6563
const handleKakaoSignup = () => {
6664
console.log("카카오 회원가입 시도")
67-
onNavigate("dashboard")
65+
router.push("/dashboard")
6866
}
6967

7068
const handleNextStep = () => {
@@ -82,7 +80,7 @@ export default function SignupPage({ onNavigate }: SignupPageProps) {
8280
const handleSubmit = (e: React.FormEvent) => {
8381
e.preventDefault()
8482
console.log("회원가입 완료:", formData)
85-
onNavigate("dashboard")
83+
router.push("/dashboard")
8684
}
8785

8886
const renderStepContent = () => {
@@ -373,7 +371,7 @@ export default function SignupPage({ onNavigate }: SignupPageProps) {
373371
{/* Header */}
374372
<div className="text-center mb-8">
375373
<button
376-
onClick={() => onNavigate("dashboard")}
374+
onClick={() => router.push("/")}
377375
className="inline-flex items-center text-blue-600 hover:text-blue-800 mb-4"
378376
>
379377
<ArrowLeft className="w-4 h-4 mr-2" />
@@ -431,7 +429,7 @@ export default function SignupPage({ onNavigate }: SignupPageProps) {
431429
{currentStep === 1 && (
432430
<div className="text-center mt-6">
433431
<span className="text-gray-600">이미 계정이 있으신가요? </span>
434-
<button onClick={() => onNavigate("login")} className="text-blue-600 hover:text-blue-800 font-medium">
432+
<button onClick={() => router.push("/login")} className="text-blue-600 hover:text-blue-800 font-medium">
435433
로그인
436434
</button>
437435
</div>
@@ -446,4 +444,4 @@ export default function SignupPage({ onNavigate }: SignupPageProps) {
446444
</div>
447445
</div>
448446
)
449-
}
447+
}

0 commit comments

Comments
 (0)