style: Change post detail page layout

This commit is contained in:
jhynsoo 2023-11-09 16:09:16 +09:00
parent b13fc5bd16
commit 3385f1457d
2 changed files with 6 additions and 31 deletions

View File

@ -80,7 +80,7 @@ const ProductPriceGraph = ({ id }) => {
></Line> ></Line>
</S.GraphArea> </S.GraphArea>
<S.Text> <S.Text>
최근 6개월간 최저 <span>{minPriceString}</span> 최근 6개월간 최저 <span>{minPriceString}</span>
</S.Text> </S.Text>
</S.ProductPriceGraph> </S.ProductPriceGraph>
); );

View File

@ -11,20 +11,9 @@ import ProductPriceGraph from '../../components/Graph/ProductPriceGraph';
import { SubTitle } from '../../styles/Common.styles'; import { SubTitle } from '../../styles/Common.styles';
import ButtonArea from '../../components/ButtonArea'; import ButtonArea from '../../components/ButtonArea';
import Button from '../../components/Button'; import Button from '../../components/Button';
import Spacer from '../../components/Spacer';
import { useOverlay } from '@toss/use-overlay'; import { useOverlay } from '@toss/use-overlay';
import { Dialog, Slide } from '@mui/material'; import { Suspense } from 'react';
import React, { Suspense } from 'react'; import CustomDialog from '../../components/CustomDialog';
const Transition = React.forwardRef(function Transition(props, ref) {
return (
<Slide
direction="up"
ref={ref}
{...props}
/>
);
});
const PostDetail = () => { const PostDetail = () => {
const overlay = useOverlay(); const overlay = useOverlay();
@ -32,29 +21,15 @@ const PostDetail = () => {
const { data } = usePost(id); const { data } = usePost(id);
const openOverlay = () => { const openOverlay = () => {
overlay.open(({ isOpen, close }) => ( overlay.open(({ isOpen, close }) => (
<Dialog <CustomDialog
open={isOpen} open={isOpen}
onClose={close} onClose={close}
TransitionComponent={Transition} title={'최근 거래 가격'}
PaperProps={{
style: {
padding: '8px 24px 24px 24px',
borderRadius: '20px',
},
}}
slotProps={{
backdrop: {
style: {
backdropFilter: 'blur(5px)',
},
},
}}
> >
<SubTitle>최근 거래 가격</SubTitle>
<Suspense fallback={<></>}> <Suspense fallback={<></>}>
<ProductPriceGraph id={data.product.id} /> <ProductPriceGraph id={data.product.id} />
</Suspense> </Suspense>
</Dialog> </CustomDialog>
)); ));
}; };