-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3628d09
commit 47c71ac
Showing
13 changed files
with
235 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 { instance } from 'api'; | ||
import { ApiResponse } from 'types/api'; | ||
|
||
// 게시판 리스트 | ||
export const getToggleRequestList = async ({ | ||
page = 0, | ||
size = 10, | ||
title = '', | ||
content = '', | ||
createdDate = '', | ||
}): Promise<ApiResponse> => { | ||
const response = await instance.get( | ||
`/api/notice?page=${page}&size=${size}&title=${title}&content=${content}&createdDate=${createdDate}`, | ||
); | ||
return response.data; | ||
}; |
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,15 @@ | ||
import { PropsWithChildren } from 'react'; | ||
import * as Styled from './style'; | ||
|
||
interface ContentBodyWrapper { | ||
blue?: boolean; | ||
} | ||
|
||
const ContentBodyWrapper = ({ | ||
children, | ||
blue, | ||
}: PropsWithChildren<ContentBodyWrapper>) => { | ||
return <Styled.Body>{children}</Styled.Body>; | ||
}; | ||
|
||
export default ContentBodyWrapper; |
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,7 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Body = styled.div` | ||
padding: 3rem 5rem; | ||
margin-top: 3rem; | ||
border-radius: 1.2rem; | ||
`; |
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,7 @@ | ||
import * as Styled from './style'; | ||
|
||
const ContentContainer = ({ children }: React.PropsWithChildren) => { | ||
return <Styled.Wrapper>{children}</Styled.Wrapper>; | ||
}; | ||
|
||
export default ContentContainer; |
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,5 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Wrapper = styled.div` | ||
padding: 8rem 0 12rem; | ||
`; |
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,20 +1,68 @@ | ||
import { styled } from 'styled-components'; | ||
import styled from 'styled-components'; | ||
import { COLOR } from 'constants/Color'; | ||
import { FONT } from 'constants/Font'; | ||
|
||
export const Modal = styled.div` | ||
// export const Modal = styled.div` | ||
// display: flex; | ||
// justify-content: space-between; | ||
// `; | ||
|
||
// export const ModalTest = styled.div` | ||
// position: fixed; | ||
// top: 25vh; | ||
// left: 25%; | ||
// width: 50%; | ||
// height: 30%; | ||
// background-color: white; | ||
// padding: 1rem; | ||
// border-radius: 14px; | ||
// box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); | ||
// z-index: 120; | ||
// animation: slide-down 300ms ease-out forwards; | ||
// `; | ||
|
||
export const Container = styled.div` | ||
&:hover { | ||
background-color: ${COLOR.GRAY_50}; | ||
} | ||
`; | ||
|
||
export const Article = styled.article` | ||
border-bottom: 0.1rem solid ${COLOR.GRAY_100}; | ||
padding: 2.5rem; | ||
`; | ||
|
||
export const ArticleHeader = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
export const Title = styled.p` | ||
display: block; | ||
${FONT.BOLD_20}; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
`; | ||
|
||
export const ContentWrapper = styled.ul` | ||
margin-top: 1rem; | ||
font-size: ${FONT.REGULAR_16}; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
`; | ||
|
||
export const Content = styled.li` | ||
padding: 22px 20px; | ||
border-bottom: 1px solid #f0f0f0; | ||
width: 100%; | ||
flex-basis: 100%; | ||
box-sizing: border-box; | ||
`; | ||
|
||
export const ModalTest = styled.div` | ||
position: fixed; | ||
top: 25vh; | ||
left: 25%; | ||
width: 50%; | ||
height: 30%; | ||
background-color: white; | ||
padding: 1rem; | ||
border-radius: 14px; | ||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); | ||
z-index: 120; | ||
animation: slide-down 300ms ease-out forwards; | ||
export const Detail = styled.div` | ||
font-size: ${FONT.REGULAR_14}; | ||
color: ${COLOR.GRAY_200}; | ||
margin-top: 1.2rem; | ||
`; |
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,18 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { getToggleRequestList } from 'api/board'; | ||
|
||
interface GetRequestList { | ||
page: number; | ||
query?: string; | ||
} | ||
|
||
const useGetToggleRequestList = ({ page }: GetRequestList) => { | ||
const { data: requestList } = useQuery( | ||
['boardList', { page }], | ||
() => getToggleRequestList({ page }), | ||
{ keepPreviousData: true }, | ||
); | ||
return requestList; | ||
}; | ||
|
||
export default useGetToggleRequestList; |
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,40 @@ | ||
// import { ROUTE } from 'constants/Route'; | ||
|
||
// import { useCallback } from 'react'; | ||
|
||
// interface BoardFilterType { | ||
// boardFilter: BoardFilterStoreType; | ||
// handlePage: (page: number) => void; | ||
// handleToggle: () => void; | ||
// isActive: string; | ||
// } | ||
|
||
// const useBoardFilter = (): BoardFilterType => { | ||
// //현재 페이지 추적 | ||
// const boardFilter = useBoardFilterStore(); | ||
// const isActive = boardFilter.query === ROUTE.BOARD_MY_LIST ? 'active' : ''; | ||
|
||
// const handlePage = useCallback( | ||
// (page: number) => { | ||
// boardFilter.setPageNumber(page); | ||
// }, | ||
// [boardFilter], | ||
// ); | ||
|
||
// // const handleToggle = useCallback(() => { | ||
// // boardFilter.reset(); | ||
// // boardFilter.setQuery( | ||
// // boardFilter.query === ROUTE.BOARD_LIST | ||
// // ? ROUTE.BOARD_MY_LIST | ||
// // : ROUTE.BOARD_LIST, | ||
// // ); | ||
// // }, [boardFilter]); | ||
// return { | ||
// boardFilter, | ||
// handlePage, | ||
// // handleToggle, | ||
// isActive, | ||
// }; | ||
// }; | ||
|
||
// export default useBoardFilter; |
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 was deleted.
Oops, something went wrong.
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