Skip to content

Commit

Permalink
Merge pull request #88 from dnd-side-project/feature/FN-7
Browse files Browse the repository at this point in the history
μ§μ ‘μž…λ ₯만 μžˆμ„ μ‹œ λŒ€μ‹œλ³΄λ“œμš© ν™”λ©΄ κ΅¬ν˜„
  • Loading branch information
spolice0324 authored Mar 20, 2024
2 parents dfeaad5 + 1614784 commit a1932df
Show file tree
Hide file tree
Showing 17 changed files with 269 additions and 57 deletions.
29 changes: 29 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions components/bottom-sheet/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { useState } from 'react'
import { Drawer, DrawerContent } from '../ui/drawer'

const BottomSheet = () => {
const [bottomSheet, setBottomSheet] = useState({
isOpen: false,
})

return (
<Drawer
open={bottomSheet.isOpen}
onOpenChange={(open) =>
setBottomSheet((prev) => ({
...prev,
isOpen: open,
}))
}
>
<DrawerContent>
<div className="p-5 flex flex-col space-y-8">
<h1 className="text-mainTitle2-bold text-text-main-black11">
GRRREW Team
</h1>
</div>
</DrawerContent>
</Drawer>
)
}

export default BottomSheet
16 changes: 11 additions & 5 deletions components/compositions/dashboard/best-worth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,17 @@ function BestWorth({ filter }: { filter: FilterType }) {
) : (
<>
<h2 className="text-mainTitle2-bold font-bold">
κ°€μž₯ μ€‘μš”ν•œ 것은{' '}
<b style={{ color: orderByMaxValueList?.[0].color }}>
{orderByMaxValueList?.[0].legend.split(' ')[2]}
</b>
μ΄λ„€μš”
{orderByMaxValueList?.[0].legend.split(' ')[2] === '직접' ? (
<span>μΉœκ΅¬κ°€ 써쀀 닡변을 ν™•μΈν•˜μ„Έμš”</span>
) : (
<span>
κ°€μž₯ μ€‘μš”ν•œ 것은{' '}
<b style={{ color: orderByMaxValueList?.[0].color }}>
{orderByMaxValueList?.[0].legend.split(' ')[2]}
</b>
μ΄λ„€μš”
</span>
)}
</h2>
<div className="flex justify-center py-12 items-center rounded-2xl shadow-basic mt-8 flex-col px-6">
<div className="w-[180px] h-[180px] mx-auto relative">
Expand Down
27 changes: 16 additions & 11 deletions components/compositions/dashboard/happy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,23 @@ const Happy = ({ filter }: { filter: FilterType }) => {
</>
) : (
<>
{' '}
<h2 className="text-mainTitle2-bold mb-5">
기쁠 λ•Œ
<br />
<b
className="break-keep"
style={{
color: orderByMaxValueList?.[0].color,
}}
>
{orderByMaxValueList?.[0].text}
</b>
{orderByMaxValueList?.[0].text === '직접 μž…λ ₯' ? (
<span>μΉœκ΅¬κ°€ 써쀀 닡변을 ν™•μΈν•΄λ³΄μ„Έμš”</span>
) : (
<h2 className="text-mainTitle2-bold mb-5">
기쁠 λ•Œ <br />
<b
className="break-keep"
style={{
color: orderByMaxValueList?.[0].color,
}}
>
{' '}
<span>{orderByMaxValueList?.[0].text}</span>
</b>
</h2>
)}
</h2>
<div className="flex flex-col justify-center space-y-8 px-8 py-12 rounded-2xl shadow-basic mx-auto">
{orderByMaxValueList?.slice(0, 3).map((item, index) => {
Expand Down
26 changes: 16 additions & 10 deletions components/compositions/dashboard/sad/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,22 @@ const Sad = ({ filter }: { filter: FilterType }) => {
) : (
<>
<h2 className="text-mainTitle2-bold mb-5">
μŠ¬ν”„κ±°λ‚˜ ν™”λ‚  λ•Œ
<br />
<b
className="break-keep"
style={{
color: orderByMaxValueList?.[0].color,
}}
>
{orderByMaxValueList?.[0].text}
</b>
{orderByMaxValueList?.[0].text === '직접 μž…λ ₯' ? (
<span>μΉœκ΅¬κ°€ 써쀀 닡변을 ν™•μΈν•΄λ³΄μ„Έμš”</span>
) : (
<h2 className="text-mainTitle2-bold mb-5">
μŠ¬ν”„κ±°λ‚˜ ν™”λ‚  λ•Œ <br />
<b
className="break-keep"
style={{
color: orderByMaxValueList?.[0].color,
}}
>
{' '}
<span>{orderByMaxValueList?.[0].text}</span>
</b>
</h2>
)}
</h2>
<div className="flex flex-col justify-center space-y-8 px-8 py-12 rounded-2xl shadow-basic mx-auto">
{orderByMaxValueList?.slice(0, 3).map((item, index) => {
Expand Down
6 changes: 3 additions & 3 deletions components/compositions/header/alert/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Drawer from '@/components/ui/drawer'
import React, { useState } from 'react'
import AlertCard from './alert-card'
import SideDrawer from '@/components/side-drawer'

const Alert = () => {
const [openAlert, setOpenAlert] = useState(false)
return (
<Drawer
<SideDrawer
header={{
center: <p className="text-body1-bold">μ•Œλ¦Ό</p>,
options: {
Expand Down Expand Up @@ -50,7 +50,7 @@ const Alert = () => {
<AlertCard isRead />
<AlertCard isRead />
</div>
</Drawer>
</SideDrawer>
)
}

Expand Down
6 changes: 3 additions & 3 deletions components/compositions/header/developer-info/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Drawer from '@/components/ui/drawer'
import React, { useEffect, useRef, useState } from 'react'
import WriteListCard from '@/components/compositions/header/write-list/wirte-list-card'
import useFilter, { Filter } from '@/hooks/use-filter'
Expand All @@ -10,6 +9,7 @@ import Yh from '@/components/svgs/mimoticons/yh'
import Es from '@/components/svgs/mimoticons/es'
import Aa from '@/components/svgs/mimoticons/aa'
import Logo from '@/components/svgs/logo'
import SideDrawer from '@/components/side-drawer'
const container = {
hidden: { opacity: 0 },
show: {
Expand All @@ -30,7 +30,7 @@ const DeveloperInfo = () => {
})

return (
<Drawer
<SideDrawer
header={{
center: <p className="text-body1-bold">μ œμž‘ 정보</p>,
options: {
Expand Down Expand Up @@ -123,7 +123,7 @@ const DeveloperInfo = () => {
</div>
</div>
</div>
</Drawer>
</SideDrawer>
)
}

Expand Down
7 changes: 4 additions & 3 deletions components/compositions/header/edit-setting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Button from '@/components/button'
import InputLabel from '@/components/inputLabel'
import Inputbox from '@/components/inputbox'
import Drawer from '@/components/ui/drawer'
import SideDrawer from '@/components/side-drawer'

import FormLayout from '@/layout/form-layout'
import { toastError } from '@/lib/client/alert'
import { cn } from '@/lib/client/utils'
Expand Down Expand Up @@ -37,7 +38,7 @@ const EditProfile = () => {
}
}
return (
<Drawer
<SideDrawer
header={{
center: <p className="text-body1-bold">ν”„λ‘œν•„ μˆ˜μ •</p>,
options: {
Expand Down Expand Up @@ -82,7 +83,7 @@ const EditProfile = () => {

<Button type="submit">λ‹€μŒ</Button>
</form>
</Drawer>
</SideDrawer>
)
}

Expand Down
6 changes: 3 additions & 3 deletions components/compositions/header/setting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Drawer from '@/components/ui/drawer'
import React, { useState } from 'react'
import Modal from '@/components/modal'
import EditProfile from '@/components/compositions/header/edit-setting'
Expand All @@ -7,6 +6,7 @@ import { useSession } from '@/provider/session-provider'
import { NamuiApi } from '@/lib/namui-api'
import { toastError } from '@/lib/client/alert'
import DeveloperInfo from '../developer-info'
import SideDrawer from '@/components/side-drawer'

const Setting = () => {
const [openSetting, setOpenSetting] = useState(false)
Expand All @@ -22,7 +22,7 @@ const Setting = () => {
}
}
return (
<Drawer
<SideDrawer
header={{
center: <p className="text-body1-bold">μ„€μ •</p>,
options: {
Expand Down Expand Up @@ -123,7 +123,7 @@ const Setting = () => {
<DeveloperInfo />
</section>
</div>
</Drawer>
</SideDrawer>
)
}

Expand Down
6 changes: 3 additions & 3 deletions components/compositions/header/write-list/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Drawer from '@/components/ui/drawer'
import React, { ReactNode, useState } from 'react'
import WriteListCard from '@/components/compositions/header/write-list/wirte-list-card'
import useFilter, { Filter } from '@/hooks/use-filter'
Expand All @@ -7,6 +6,7 @@ import { useIntersectionObserver } from '@/hooks/use-observer'
import { InfiniteData, useInfiniteQuery } from '@tanstack/react-query'
import { WritingListResponse } from '@/queries/surveys'
import { NamuiApi } from '@/lib/namui-api'
import SideDrawer from '@/components/side-drawer'

const container = {
hidden: { opacity: 0 },
Expand Down Expand Up @@ -50,7 +50,7 @@ const WriteList = ({ trigger }: { trigger?: ReactNode }) => {
})

return (
<Drawer
<SideDrawer
header={{
center: <p className="text-body1-bold">μž‘μ„±λͺ©λ‘</p>,
options: {
Expand Down Expand Up @@ -116,7 +116,7 @@ const WriteList = ({ trigger }: { trigger?: ReactNode }) => {
</motion.ul>
<div ref={ref} className="h-2 w-2" />
</div>
</Drawer>
</SideDrawer>
)
}

Expand Down
7 changes: 4 additions & 3 deletions components/dashboard-container/detail-drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext, useEffect, useMemo, useRef } from 'react'
import Drawer from '../ui/drawer'

import useFilter, { Filter } from '@/hooks/use-filter'
import { InfiniteData, useInfiniteQuery } from '@tanstack/react-query'
import { NamuiApi } from '@/lib/namui-api'
Expand All @@ -15,6 +15,7 @@ import { cn } from '@/lib/client/utils'
import { ShareImageContext } from '../share-image'
import { parseShareCardItems } from '../share-image/constants'
import { useMount } from '@/hooks/use-mount'
import SideDrawer from '../side-drawer'

export interface DetailResponse {
data: Data
Expand Down Expand Up @@ -62,7 +63,7 @@ const DetailDrawer = () => {
return !isMounted ? (
<></>
) : (
<Drawer
<SideDrawer
zIndex={19}
header={{
center: <p className="text-body1-bold">상세 보기</p>,
Expand All @@ -79,7 +80,7 @@ const DetailDrawer = () => {
{typeof router.query.id === 'string' ? (
<Content id={router.query.id} type={detailType} />
) : null}
</Drawer>
</SideDrawer>
)
}

Expand Down
8 changes: 5 additions & 3 deletions components/share-image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import { useSession } from '@/provider/session-provider'
import { parseShareCardItems } from './constants'
import { Period, Relation, TreeType, treeCardAsset } from '@/model/tree.entity'
import { cn } from '@/lib/client/utils'
import Drawer from '../ui/drawer'

import Reason from '@/components/compositions/answers/reason'
import SideDrawer from '../side-drawer'

type TWO_CHOICE =
| 'FRIENDLINESS_LEVEL'
| 'PERSONALITY_TYPE'
Expand Down Expand Up @@ -258,7 +260,7 @@ export const ShareImageDrawer = () => {
if (!context) throw new Error('ShareImageContext')
const { showShareImage, imageProps } = context
return (
<Drawer
<SideDrawer
zIndex={21}
header={{
showHeader: false,
Expand Down Expand Up @@ -304,6 +306,6 @@ export const ShareImageDrawer = () => {
value={imageProps.value}
/>
)}
</Drawer>
</SideDrawer>
)
}
Loading

0 comments on commit a1932df

Please sign in to comment.