Skip to content

Commit

Permalink
Merge pull request #9 from 9oormDari/feature/User
Browse files Browse the repository at this point in the history
[#6] ๋กœ๊ทธ์ธ ํšŒ์›๊ฐ€์ž… ์™„์„ฑ ๋ฐ ๋กœ์ปฌ ๋ฐฐํฌ ์ž๋™ํ™”
  • Loading branch information
karpitony authored Sep 26, 2024
2 parents 1a68606 + 30021fd commit ed282df
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 22 deletions.
13 changes: 9 additions & 4 deletions src/pages/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { Suspense } from 'react';
import { Outlet } from 'react-router-dom';
import Header from '../components/Header/Header.tsx';
import { Outlet, useLocation } from 'react-router-dom';

import Footer from '../components/Footer/Footer.tsx';
import Header from '../components/Header/Header.tsx';
import { Suspense } from 'react';

export default function NotFoundPage() {
const location = useLocation();
const hideFooter =
location.pathname === '/login' || location.pathname === '/register';

return (
<div>
<Header />
<Suspense fallback={'loading...'}>
<Outlet />
</Suspense>
<Footer />
{!hideFooter && <Footer />}
</div>
);
}
35 changes: 27 additions & 8 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,56 @@
import cn from '../lib/cn.ts';
import { useNavigate } from 'react-router-dom';

export default function Login() {
const navigate = useNavigate();

return (
<div className="flex items-center justify-center min-h-[500px] py-[50px]">
<div className="w-full max-w-xs flex flex-col items-center gap-[50px]">
<div
className={cn(
'flex items-center justify-center min-h-[500px] pt-[50px]'
)}
>
<div
className={cn(
'w-full max-w-xs flex flex-col items-center gap-[50px]'
)}
>
{/* ๋กœ๊ทธ์ธ ํ…์ŠคํŠธ ์˜์—ญ */}
<div className="text-center">
<h1 className="text-4xl font-bold">๋กœ๊ทธ์ธ</h1>
</div>

{/* ์•„์ด๋”” ๋ฐ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„๋“œ ์˜์—ญ */}
<div className="flex flex-col items-center gap-[10px]">
<div className={cn('flex flex-col items-center gap-[10px]')}>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="text"
placeholder="์•„์ด๋””"
/>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="password"
placeholder="๋น„๋ฐ€๋ฒˆํ˜ธ"
/>
</div>

{/* ๋กœ๊ทธ์ธ ๋ฐ ํšŒ์›๊ฐ€์ž… ๋ฒ„ํŠผ ์˜์—ญ */}
<div className="flex flex-col items-center gap-[10px]">
<button className="w-[500px] h-[70px] bg-black text-white font-bold rounded hover:bg-black focus:outline-none focus:ring-2 focus:ring-black">
<div className={cn('flex flex-col items-center gap-[10px]')}>
<button
className={cn(
'w-[500px] h-[70px] bg-[#5A82F1] text-white font-bold rounded hover:bg-[#4A72D1] focus:outline-none focus:ring-2 focus:ring-[#5A82F1]'
)}
>
๋กœ๊ทธ์ธ
</button>
<button
className="w-[500px] h-[70px] bg-black text-white font-bold rounded hover:bg-black focus:outline-none focus:ring-2 focus:ring-black"
className={cn(
'w-[500px] h-[70px] bg-[#575757] text-white font-bold rounded hover:bg-[#474747] focus:outline-none focus:ring-2 focus:ring-[#575757]'
)}
onClick={() => navigate('/register')}
>
ํšŒ์›๊ฐ€์ž…
Expand Down
50 changes: 40 additions & 10 deletions src/pages/register.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,72 @@
import cn from '../lib/cn.ts';
import { useNavigate } from 'react-router-dom';

export default function Register() {
const navigate = useNavigate();

return (
<div className="flex items-center justify-center min-h-[500px] py-[50px]">
<div className="w-full max-w-xs flex flex-col items-center gap-[50px]">
<div
className={cn(
'flex items-center justify-center min-h-[500px] pt-[50px]'
)}
>
<div
className={cn(
'w-full max-w-xs flex flex-col items-center gap-[50px]'
)}
>
{/* ํšŒ์›๊ฐ€์ž… ํ…์ŠคํŠธ ์˜์—ญ */}
<div className="text-center">
<h1 className="text-4xl font-bold">ํšŒ์›๊ฐ€์ž…</h1>
</div>

{/* ์ž…๋ ฅ ํ•„๋“œ ์˜์—ญ */}
<div className="flex flex-col items-center gap-[10px]">
<div className={cn('flex flex-col items-center gap-[10px]')}>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="text"
placeholder="๋‹‰๋„ค์ž„"
/>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="text"
placeholder="์•„์ด๋””"
/>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="password"
placeholder="๋น„๋ฐ€๋ฒˆํ˜ธ"
/>
<input
className="w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
className={cn(
'w-[500px] h-[70px] px-4 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-[#E9EBF8]'
)}
type="password"
placeholder="๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ"
/>
</div>

{/* ํ™•์ธ ๋ฐ ์ทจ์†Œ ๋ฒ„ํŠผ ์˜์—ญ */}
<div className="flex w-[500px] gap-[10px]">
<button className="w-1/2 h-[70px] bg-black text-white font-bold rounded hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-black">
<div className={cn('flex w-[500px] gap-[10px]')}>
<button
className={cn(
'w-1/2 h-[70px] bg-[#5A82F1] text-white font-bold rounded hover:bg-[#4A72D1] focus:outline-none focus:ring-2 focus:ring-[#5A82F1]'
)}
>
ํ™•์ธ
</button>
<button className="w-1/2 h-[70px] bg-[#939393] text-white font-bold rounded hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-500">
<button
className={cn(
'w-1/2 h-[70px] bg-[#A2A2A2] text-white font-bold rounded hover:bg-[#929292] focus:outline-none focus:ring-2 focus:ring-[#A2A2A2]'
)}
onClick={() => navigate(-1)}
>
์ทจ์†Œ
</button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ export default defineConfig({
layout: '_layout',
}),
],
server: {
port: 5174,
host: true,
strictPort: false,
},
});

0 comments on commit ed282df

Please sign in to comment.