-
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.
๐ ํค๋ ๋ค๋น ํธํฐ ๋์์ธ ์ ์ฉ (#124)
* fix: dot_fill, dot_empty๋ฅผ SVG๋ก ์์ * design: Header ๋์์ธ ์ ์ฉ * design: ๋ค๋น๋ฐ ๋์์ธ ์ ์ฉ, ๋ฆฌํฉํฐ๋ง * design: ํธํฐ ๋์์ธ ์ ์ฉ * fix: ๋ค๋น๋ฐ ์ ๊ณผ ํ ์คํธ ๋ฏธ์ธ์กฐ์
- Loading branch information
Showing
14 changed files
with
295 additions
and
271 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"/Users/seongyeolyi/Developer/csereal-web/lint-staged.config.js":"1","/Users/seongyeolyi/Developer/csereal-web/app/[locale]/reservations/privacy-policy/page.tsx":"2","/Users/seongyeolyi/Developer/csereal-web/components/layout/pageLayout/PageTitle.tsx":"3"},{"size":149,"mtime":1707396207012,"results":"4","hashOfConfig":"5"},{"size":3003,"mtime":1707396228182,"results":"6","hashOfConfig":"5"},{"size":2893,"mtime":1707396207012,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","suppressedMessages":"10","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"vi4zds",{"filePath":"11","messages":"12","suppressedMessages":"13","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/seongyeolyi/Developer/csereal-web/lint-staged.config.js",[],[],"/Users/seongyeolyi/Developer/csereal-web/app/[locale]/reservations/privacy-policy/page.tsx",[],[],"/Users/seongyeolyi/Developer/csereal-web/components/layout/pageLayout/PageTitle.tsx",[],[]] |
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 useCurrentSegmentNode from '@/hooks/useCurrentSegmentNode'; | ||
|
||
import { main } from '@/types/page'; | ||
|
||
export type FooterMode = 'light' | 'dark'; | ||
|
||
// TODO: ํ์ด์ง๋ณ ๋ชจ๋ ์ ์ฉํ๊ธฐ | ||
export default function useFooterDesignMode(): FooterMode { | ||
const node = useCurrentSegmentNode(); | ||
if (node === main) return 'dark'; | ||
else return 'light'; | ||
} |
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 |
---|---|---|
@@ -1,42 +1,43 @@ | ||
'use client'; | ||
|
||
import { useRouter } from 'next/navigation'; | ||
import { useState, ChangeEventHandler, FormEventHandler } from 'react'; | ||
import { useState } from 'react'; | ||
|
||
export default function HeaderSearchBar() { | ||
const [text, setText] = useState(''); | ||
const router = useRouter(); | ||
|
||
const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => { | ||
setText(e.target.value); | ||
}; | ||
|
||
const searchText: FormEventHandler<HTMLFormElement> = (e) => { | ||
e.preventDefault(); | ||
const query = text.trim(); | ||
if (query) { | ||
router.push(`/search?query=${query}`); | ||
} | ||
}; | ||
const { text, setText, searchText } = useSearch(); | ||
|
||
return ( | ||
<form | ||
className="flex justify-center outline-none rounded-[.0625rem] min-w-[8rem] w-[13.5rem] h-[1.875rem] bg-neutral-200 pr-2" | ||
onSubmit={searchText} | ||
className="flex justify-center outline-none rounded-[.0625rem] w-[13.5rem] h-[1.875rem] bg-neutral-200 pr-2" | ||
onSubmit={(e) => { | ||
e.preventDefault(); | ||
searchText(); | ||
}} | ||
> | ||
<input | ||
type="text" | ||
id="search" | ||
className="outline-none font-yoon text-xs w-full px-2 bg-transparent autofill-bg-neutral-200" | ||
className="outline-none text-xs w-full px-2 bg-transparent autofill-bg-neutral-200" | ||
value={text} | ||
onChange={handleChange} | ||
onChange={(e) => setText(e.target.value)} | ||
/> | ||
<button className="flex justify-center items-center w-fit"> | ||
{/* TODO: ๋๋ณด๊ธฐ ํธ๋ฒ ์ */} | ||
<span className="material-symbols-rounded text-[1.25rem] font-light text-[#1f2021]"> | ||
search | ||
</span> | ||
<button className="material-symbols-rounded text-[1.25rem] text-neutral-800 hover:text-neutral-500"> | ||
search | ||
</button> | ||
</form> | ||
); | ||
} | ||
|
||
function useSearch() { | ||
const [text, setText] = useState(''); | ||
const router = useRouter(); | ||
|
||
const searchText = () => { | ||
const query = text.trim(); | ||
if (query) { | ||
router.push(`/search?query=${query}`); | ||
} | ||
}; | ||
|
||
return { text, setText, searchText }; | ||
} |
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
Oops, something went wrong.