-
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.
* feat: 게시물 조회 api 연동 * feat(apps/web): sidebar에 dnd 기능 적용 * fix(packages/ui): IconButton disabled 스타일 임시로 추가 * feat(apps/web): 게시글 위아래 이동 기능 추가 * feat(apps/web): 게시글 관련 api 추가 * feat(apps/web): api 연결 * fix: 빌드 에러 * feat: 페이지 합치기 * feat(apps/web): EditSideBar에서 스켈레톤 뜨도록 * fix(packages/ui): Accordion 제어 방식 지원하도록 수정, EditSidebar Empty view 추가 * feat: 이전 기록 페이지 api
- Loading branch information
1 parent
e0ba717
commit ab88781
Showing
47 changed files
with
1,411 additions
and
338 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
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
13 changes: 13 additions & 0 deletions
13
apps/web/src/app/(prompt)/edit/[agentId]/[postGroupId]/detail/EditDetail.css.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,13 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
export const editDetailPage = style({ | ||
display: 'flex', | ||
height: '100vh', | ||
flexShrink: 0, | ||
}); | ||
|
||
export const flexColumn = style({ | ||
display: 'flex', | ||
width: '100%', | ||
justifyContent: 'center', | ||
}); |
37 changes: 37 additions & 0 deletions
37
apps/web/src/app/(prompt)/edit/[agentId]/[postGroupId]/detail/EditDetail.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,37 @@ | ||
'use client'; | ||
|
||
import { createContext, Dispatch, SetStateAction } from 'react'; | ||
import { EditPost } from './_components/EditPost/EditPost'; | ||
import { EditSidebar } from './_components/EditSidebar/EditSidebar'; | ||
import { editDetailPage, flexColumn } from './EditDetail.css'; | ||
import { useState } from 'react'; | ||
import { Post } from '@web/types'; | ||
|
||
// TODO 추후 Jotai, 또는 react-query 사용으로 수정할 예정 | ||
interface DetailPageContextType { | ||
loadingPosts: Post['id'][]; | ||
setLoadingPosts: Dispatch<SetStateAction<Post['id'][]>>; | ||
} | ||
|
||
const defaultContextValue: DetailPageContextType = { | ||
loadingPosts: [], | ||
setLoadingPosts: () => {}, | ||
}; | ||
|
||
export const DetailPageContext = | ||
createContext<DetailPageContextType>(defaultContextValue); | ||
|
||
export function EditDetail() { | ||
const [loadingPosts, setLoadingPosts] = useState<Post['id'][] | []>([]); | ||
|
||
return ( | ||
<DetailPageContext.Provider value={{ loadingPosts, setLoadingPosts }}> | ||
<div className={editDetailPage}> | ||
<EditSidebar /> | ||
<div className={flexColumn}> | ||
<EditPost /> | ||
</div> | ||
</div> | ||
</DetailPageContext.Provider> | ||
); | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...c/app/(prompt)/edit/[agentId]/[postGroupId]/detail/_components/DragGuide/DragGuide.css.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,20 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { vars } from '@repo/theme'; | ||
|
||
export const container = style({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'column', | ||
width: '100%', | ||
height: 'fit-content', | ||
borderRadius: vars.borderRadius[24], | ||
border: `1px solid ${vars.colors.grey50}`, | ||
background: vars.colors.grey, | ||
padding: vars.space[40], | ||
}); | ||
|
||
export const description = style({ | ||
textAlign: 'center', | ||
whiteSpace: 'pre-wrap', | ||
}); |
29 changes: 29 additions & 0 deletions
29
.../src/app/(prompt)/edit/[agentId]/[postGroupId]/detail/_components/DragGuide/DragGuide.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,29 @@ | ||
import * as styles from './DragGuide.css'; | ||
import { Text } from '@repo/ui'; | ||
|
||
type DragGuideProps = { | ||
description: string; | ||
}; | ||
|
||
export function DragGuide({ description }: DragGuideProps) { | ||
return ( | ||
<div className={styles.container}> | ||
<Text.H2 | ||
className={styles.description} | ||
fontSize={20} | ||
fontWeight="semibold" | ||
color="grey500" | ||
> | ||
{description} | ||
</Text.H2> | ||
<Text.H2 | ||
className={styles.description} | ||
fontSize={20} | ||
fontWeight="semibold" | ||
color="grey500" | ||
> | ||
끌어서 여기에 놓아주세요 | ||
</Text.H2> | ||
</div> | ||
); | ||
} |
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
Oops, something went wrong.