-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: 링크 검색 기능, 링크 추가 기능 구현 #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/Link-\uD398\uC774\uC9C0"
Changes from 6 commits
7dd4754
4055f2b
6eaaace
68874c1
db99170
ba25f72
729e5a5
b00868b
866a0f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,21 @@ | ||
| import { ChangeEvent, KeyboardEvent, useState } from "react"; | ||
| import { FolderListData } from "@/types/folderTypes"; | ||
| import { Modal } from "../modal/modalManager/ModalManager"; | ||
| import Image from "next/image"; | ||
| import SubmitButton from "../SubMitButton"; | ||
| import useModalStore from "@/store/useModalStore"; | ||
|
|
||
| const AddLinkInput = ({ folderList }: FolderListData) => { | ||
| const { isOpen, openModal } = useModalStore(); | ||
| const [link, setLink] = useState(""); | ||
|
|
||
| const handleChange = (e: ChangeEvent<HTMLInputElement>) => { | ||
| setLink(e.target.value); | ||
| }; | ||
|
|
||
| const handleClick = () => { | ||
| // Addmodal 띄우면서 link 전달 | ||
| openModal("AddModal", { list: folderList, link: link }); | ||
| setLink(""); | ||
| }; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 잘 적용해주셨군요👍
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 링크 추가 후에도 인풋에 입력값이 남아있어서 여기서 초기값 "" 으로 setLink 해주는게 좋을것같아요! |
||
|
|
||
| const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => { | ||
|
|
@@ -34,6 +38,7 @@ const AddLinkInput = ({ folderList }: FolderListData) => { | |
| <div onClick={handleClick}> | ||
| <SubmitButton className="w-[80px] h-[37px]">추가하기</SubmitButton> | ||
| </div> | ||
| {isOpen && <Modal />} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| interface SearchResultMessageProps { | ||
| message: string | string[]; | ||
| } | ||
|
|
||
| const SearchResultMessage = ({ message }: SearchResultMessageProps) => { | ||
| return ( | ||
| <div className="text-[32px] text-gray400 mt-[40px]"> | ||
| <span className="text-black300">"{message}"</span>으로 검색한 | ||
| 결과입니다. | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default SearchResultMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CardsLayout 레이아웃에 margin 을 추가하면 즐겨찾기 페이지에서도 css 가 적용되어서 아래 영역에 추가하는 게 더 좋을 것 같습니다!
