Skip to content

Commit

Permalink
fix : 13버전 변경 및 빌드 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ryu-won committed Jan 4, 2025
1 parent 6f812f7 commit 106487b
Show file tree
Hide file tree
Showing 7 changed files with 7,399 additions and 3,437 deletions.
2 changes: 1 addition & 1 deletion next.config.ts → next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const nextConfig = {
},
};

export default nextConfig;
module.exports = nextConfig; // CommonJS 방식으로 수정
10,537 changes: 7,180 additions & 3,357 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
"dependencies": {
"@tanstack/react-query": "^5.62.11",
"@tanstack/react-query-devtools": "^5.62.11",
"next": "^15.1.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"next": "^13.5.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"styled-components": "^6.1.13",
"zustand": "^5.0.2"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@types/hoist-non-react-statics": "^3.3.6",
"@types/node": "^22.10.5",
"@types/prop-types": "^15.7.14",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/styled-components": "^5.1.34",
Expand Down
24 changes: 24 additions & 0 deletions src/app/login/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// src/app/layout.tsx

import React, { ReactNode } from "react";
import Head from "next/head"; // 페이지 메타데이터 설정

// 페이지 컴포넌트에서 children을 렌더링할 수 있도록 하는 레이아웃 컴포넌트
type LayoutProps = {
children: ReactNode;
};

const Layout: React.FC<LayoutProps> = ({ children }) => {
return (
<>
{/* Head 컴포넌트에서 title, meta 태그 등을 설정 */}
<Head>
<title>로그인 페이지</title>
</Head>

{children}
</>
);
};

export default Layout;
60 changes: 31 additions & 29 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,36 @@ const Login: React.FC = () => {
};

return (
<Layout>
<Title>로그인</Title>
<FormContainer>
<Input
type="text"
placeholder="아이디"
value={username}
onChange={(e) => setUserName(e.target.value)}
/>
<PasswordContainer>
<>
<Layout>
<Title>로그인</Title>
<FormContainer>
<Input
type={showPassword ? "text" : "password"}
placeholder="비밀번호"
value={password}
onChange={(e) => setPassword(e.target.value)}
type="text"
placeholder="아이디"
value={username}
onChange={(e) => setUserName(e.target.value)}
/>
<ToggleButton type="button" onClick={toggleShowPassword}>
{showPassword ? "숨기기" : "보기"}
</ToggleButton>
</PasswordContainer>
<Button onClick={handleLogin}>로그인</Button>
</FormContainer>
<Modal
isOpen={isModalOpen}
message={modalMessage}
onClose={handleCloseModal}
/>
</Layout>
<PasswordContainer>
<Input
type={showPassword ? "text" : "password"}
placeholder="비밀번호"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<ToggleButton type="button" onClick={toggleShowPassword}>
{showPassword ? "숨기기" : "보기"}
</ToggleButton>
</PasswordContainer>
<Button onClick={handleLogin}>로그인</Button>
</FormContainer>
<Modal
isOpen={isModalOpen}
message={modalMessage}
onClose={handleCloseModal}
/>
</Layout>
</>
);
};

Expand All @@ -104,7 +106,7 @@ const Layout = styled.div`
}
`;

export const Title = styled.h1`
const Title = styled.h1`
margin-bottom: 1.5rem;
@media (max-width: 64rem) {
font-size: 1.8rem;
Expand All @@ -114,7 +116,7 @@ export const Title = styled.h1`
}
`;

export const FormContainer = styled.form`
const FormContainer = styled.form`
padding: 4.375rem 3rem 1.25rem 3rem;
border-radius: 1.25rem;
border: 0.1875rem solid rgb(255, 108, 129);
Expand Down Expand Up @@ -161,7 +163,7 @@ const ToggleButton = styled.button`
}
`;

export const Button = styled.button`
const Button = styled.button`
width: 30%;
background-color: #ffffff;
padding: 0.8rem;
Expand Down
Loading

0 comments on commit 106487b

Please sign in to comment.