generated from nim-od/softeer-mono-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from softeerbootcamp4th/TASK-41
[Feature][Task-41] 전체 레이아웃 구현 (지민님 -> 성락현 재할당)
- Loading branch information
Showing
6 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { useLocation, useMatches } from 'react-router-dom'; | ||
|
||
const useHeader = () => { | ||
const matches = useMatches(); | ||
const location = useLocation(); | ||
const matchResult = matches | ||
.filter((match) => match.id !== '0') | ||
.find((match) => match.pathname === location.pathname); | ||
const headerTitle = matchResult?.id ?? ''; | ||
return { headerTitle }; | ||
}; | ||
export default useHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { useState } from 'react'; | ||
import { Button } from 'src/components/ui/button'; | ||
import { Input } from 'src/components/ui/input'; | ||
|
||
function LoginPage() { | ||
const [userId, setUserId] = useState(''); | ||
const [password, setPassword] = useState(''); | ||
|
||
const handleIdChange = (newId: string) => { | ||
setUserId(newId); | ||
}; | ||
|
||
const handlePasswordChange = (newPassword: string) => { | ||
setPassword(newPassword); | ||
}; | ||
|
||
return ( | ||
<div className="flex h-full w-full flex-col items-center justify-center"> | ||
<p className="mb-10">Admin System</p> | ||
<div className="flex w-[200px] flex-col gap-2"> | ||
<Input | ||
placeholder="아이디를 입력하세요." | ||
value={userId} | ||
onChange={(event) => handleIdChange(event.target.value)} | ||
/> | ||
<Input | ||
type="password" | ||
placeholder="비밀번호를 입력하세요." | ||
value={password} | ||
onChange={(event) => handlePasswordChange(event.target.value)} | ||
/> | ||
<Button>로그인</Button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
export default LoginPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters