Skip to content

Commit

Permalink
feat: Fix image path
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilsang committed Aug 19, 2023
1 parent 3fdd8e5 commit 98a25a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/features/preview/components/PreviewImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import 'react-responsive-carousel/lib/styles/carousel.min.css';
import { Carousel } from 'react-responsive-carousel';
import { useState } from 'react';

import idCardBasic from '/svg/idcard_basic.svg';
import idCardMude from '/svg/idcard_mude.svg';
import meetingAdd from '/svg/meeting_add.svg';
import meetingCancel from '/svg/meeting_cancel.svg';
import meeting30 from '/svg/meeting_30.svg';

const PreviewImage = () => {
const [curNum, setCurNum] = useState<number>(0);
const imageList = [
'/svg/idcard_basic.svg',
'/svg/idcard_mude.svg',
'/svg/meeting_add.svg',
'/svg/meeting_cancel.svg',
'/svg/meeting_30.svg',
idCardBasic,
idCardMude,
meetingAdd,
meetingCancel,
meeting30,
];
console.log(curNum);
return (
Expand Down
4 changes: 3 additions & 1 deletion src/features/setting/components/SubmitForm/DailySticker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { Control } from 'react-hook-form';
import { Inputs } from '../../types';
import { stickerList, wordStickerText } from '../../constants';

import moodBad from '/png/mood_BAD.png';
import moodGood from '/png/mood_GOOD.png';
import '../../style/index.scss';

type DailyStickerProps = {
Expand Down Expand Up @@ -38,7 +40,7 @@ const DailySticker: FunctionComponent<DailyStickerProps> = ({ control }) => {
}}
/>
<img
src={`/png/${sticker}.png`}
src={sticker === 'mood_BAD' ? moodBad : moodGood}
className="logo react"
alt="React logo"
/>
Expand Down

0 comments on commit 98a25a5

Please sign in to comment.