feat: Add price graph in PriceStep component

This commit is contained in:
jhynsoo 2023-11-01 19:39:02 +09:00
parent a556e6f575
commit cef53c2e80
2 changed files with 8 additions and 1 deletions

View File

@ -1,9 +1,12 @@
import Button from '../../components/Button'; import Button from '../../components/Button';
import ButtonArea from '../../components/ButtonArea'; import ButtonArea from '../../components/ButtonArea';
import CurrencyInput from '../../components/CurrencyInput'; import CurrencyInput from '../../components/CurrencyInput';
import ProductPriceGraph from '../../components/Graph/ProductPriceGraph';
import Spacer from '../../components/Spacer';
import { SubTitle } from '../../styles/Common.styles';
import * as S from '../../styles/WriteSteps.styles'; import * as S from '../../styles/WriteSteps.styles';
function PriceStep({ gotoNextStep, gotoPrevStep, price, setPrice }) { function PriceStep({ modelId, gotoNextStep, gotoPrevStep, price, setPrice }) {
return ( return (
<S.Step> <S.Step>
<S.Title>얼마에 팔고 싶나요?</S.Title> <S.Title>얼마에 팔고 싶나요?</S.Title>
@ -12,6 +15,9 @@ function PriceStep({ gotoNextStep, gotoPrevStep, price, setPrice }) {
setValue={setPrice} setValue={setPrice}
autofocus autofocus
/> />
<Spacer height={20} />
<SubTitle>최근 판매 가격</SubTitle>
<ProductPriceGraph id={modelId} />
<ButtonArea> <ButtonArea>
<Button <Button
secondary secondary

View File

@ -56,6 +56,7 @@ function WriteSteps() {
)} )}
{step === 'price' && ( {step === 'price' && (
<PriceStep <PriceStep
modelId={formData.product}
price={formData.price} price={formData.price}
setPrice={setPrice} setPrice={setPrice}
gotoNextStep={() => setStep('photo')} gotoNextStep={() => setStep('photo')}