-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(components): ScrollTopButton 컴포넌트 분리 * refactor(MyTemplatePage): 컴포넌트 분리 및 태그목록, 카테고리 목록 서스펜스 적용 * refactor(components): TemplateDeleteSelection, TemplateListSectionLoading 컴포넌트 분리 * refactor(src): useKeyword, useShowTemplateList, useSelectAndDeleteTemplateList 훅 분리 및 MyTemplatePage 적용 * refactor(templates): 사용하지 않는 useTemplateCategoryTagQueries 훅 삭제 * refactor(pages): useShowTemplateList => useFilteredTemplateList로 이름 변경 * refactor(src): useKeyword => useSearchKeyword로 이름 변경 * refactor(ConfirmDeleteModal): ConfirmDeleteModalProps =>Props 로 변경 * refactor(CategoryListSection): Flex 대신 스타일드 컴포넌트로 스타일 지정 * refactor(ConfirmDeleteModal): Modal 합성 컴포넌트의 하위 컴포넌트 사용하도록 변경 * refactor(queries): useSuspenseQuery를 사용하는 훅들 수동으로 error 전파
- Loading branch information
Showing
31 changed files
with
637 additions
and
282 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
frontend/src/components/ScrollTopButton/ScrollTopButton.style.ts
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,21 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { theme } from '@/style/theme'; | ||
|
||
export const ScrollTopButton = styled.button` | ||
cursor: pointer; | ||
position: fixed; | ||
right: 2rem; | ||
bottom: 2rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 0.75rem; | ||
background-color: ${theme.color.light.primary_500}; | ||
border: none; | ||
border-radius: 100%; | ||
`; |
16 changes: 16 additions & 0 deletions
16
frontend/src/components/ScrollTopButton/ScrollTopButton.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ArrowUpIcon } from '@/assets/images'; | ||
import { scroll } from '@/utils'; | ||
|
||
import * as S from './ScrollTopButton.style'; | ||
|
||
const ScrollTopButton = () => ( | ||
<S.ScrollTopButton | ||
onClick={() => { | ||
scroll.top('smooth'); | ||
}} | ||
> | ||
<ArrowUpIcon aria-label='맨 위로' /> | ||
</S.ScrollTopButton> | ||
); | ||
|
||
export default ScrollTopButton; |
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,2 +1,3 @@ | ||
export { useSourceCode } from './useSourceCode'; | ||
export { useTag } from './useTag'; | ||
export { useSearchKeyword } from './useSearchKeyword'; |
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,8 @@ | ||
import { useInput, useDebounce } from '..'; | ||
|
||
export const useSearchKeyword = () => { | ||
const [keyword, handleKeywordChange] = useInput(''); | ||
const debouncedKeyword = useDebounce(keyword, 300); | ||
|
||
return { keyword, debouncedKeyword, handleKeywordChange }; | ||
}; |
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.