From e66d7a8d1f7e44b53787a99e4a36f127c5caf63b Mon Sep 17 00:00:00 2001 From: kimminjae <162538553+Darkthos@users.noreply.github.com> Date: Mon, 13 May 2024 00:36:32 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=ED=81=AC=EB=A0=88=EB=94=A7?= =?UTF-8?q?=20=EB=B6=80=EC=A1=B1=ED=95=9C=20=EC=83=81=ED=83=9C=EB=A1=9C=20?= =?UTF-8?q?=ED=88=AC=ED=91=9C=ED=95=98=EA=B8=B0=20=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EB=A9=B4=20NoCreditModal=EB=9C=A8=EA=B2=8C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#50)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐ docs: apisํด๋๋ฐ ํ์ํ์ผ ์์ฑ * โจ feat: utils/createQueryParams.js ์ฟผ๋ฆฌ ์๋ ์์ฑ ์ ํธ ์ถ๊ฐ * โจ feat: get idols, donations, chart api ๊ตฌํ * โ test: App.jsx์ getIdols ์ด๋ฏธ์ง ๋ ๋๋ง ์คํ * ๐ docs: Chart ์ปดํฌ๋ํธ ์์ฑ App.jsx ์์ ์ค๋น * โป๏ธ refactor: getIdolsApi, getDonationsApi ๋ฆฌ์คํธ๊น์ง ๋ฐ์์ค๋๊ฑฐ์์ ๋ฐ์ดํฐ๊น์ง๋ง ๋ฐ์์ค๊ฒ ๋ณ๊ฒฝ * โจ feat: chart.jsx ๊ตฌ์กฐ๋งํ์ฑ * ๐ fix: map ์ ๋ ๋๋ง๋๊ฒ * โป๏ธ refactor: ์ฟผ๋ฆฌ ์์ฑํจ์ ์ฝ๋ ๊ฐ๊ฒฐํ๊ฒ ๋ฐ๊ฟ * โป๏ธ refactor: getIdols, getCharts useState๊ฐ์ฒด๋ฅผ ํ๋ผ๋ฏธํฐ๋ก ์ ๋ฌํด์ ๊ฒ์์กฐ๊ฑด์ ์ค์ ํ๋ ๊ตฌ์กฐ๋ก ๋ฐ๋ฐ๊ฟจ์ต๋๋ค. * โจ feat: useMediaQuery ์ปค์คํ ํ ์ถ๊ฐ * โจ feat: ํฌํํ๊ธฐ ๊ธฐ๋ฅ์ ์ ์ธํ ๋ชจ๋ chart๊ธฐ๋ฅ ๊ตฌํ * โจ feat: postVotes ๊ตฌํ * ๐งช test * โจ feat: ์ธ๋ชจ์๋ ์์ด์ฝ ์ ๊ฑฐ, ํฌํ์์คํ ํธ๋ฆฌํ๊ฒ ๋ฐ๊ฟ, css ์์๊ฒ ์์ * โจ feat: voteModal ๋ชจ๋ฐ์ผ ๋ฐ์ํ css ์๋ฒฝ๊ตฌํ * โจ feat: Dialog.jsx * ๐ฅremove: dialog chart๋ธ๋์น ์์ฑ ํ ์ด์ด์ ํ๋๋ก ํ๊ฒ ์ต๋๋ค. * ๐ฅ remove: ๋ถํ์ํ ์ฃผ์ ์ ๊ฑฐ * โ test: mobile๋ก ์ ์ํด์ ํ ์คํธ * โจ feat: ๋ก์ปฌ์คํ ๋ฆฌ์ง ๊ตฌํ ์ฐจํธ ํฌํํ๊ธฐ ํด๋ฆญ์ voteModal ์ํ * ๐ Docs: ์๋ชป merge๋ postvote.js ์ญ์ * โจ feat: chart๊ตฌํ * โป๏ธ refactor: chart 1์ฐจ ๋ฆฌํฉํ ๋ง(ChartList ์ปดํฌ๋ํธ ๋ถ๋ฆฌ) * โป๏ธ refactor: chart์ปดํฌ๋ํธ ์ปค์คํ ํ ์ผ๋ก ๋ถ๋ฆฌ * ๐ Merge branch 'main' of https://github.com/BestSprinters/i-Konnect into feat/chart * โป๏ธ refactor: ์ต์ข ์ ๊ฒ * ๐ fix: ํฌ๋ ๋ง ๋ถ์กฑํ ๋ ํฌํ์, ๋ชจ๋ฌ์ฐฝ ์๊บผ์ง๊ฒ ํ๊ณ ์ ํ๋ ์์ด๋ ๊ทธ๋๋ก ์ ์ง * โป๏ธ refactor: ํ๋กญ ๋ฐ๋ ๋ฐฉ์ ๋ณํ * ๐ fix: ์ ํ๋ ์ฑ๋ณ์ ๋ฐ๋ผ ํฌํ์ฐฝ๋จ๊ฒํจ * ๐ fix: ํฌ๋ ๋ง ์ถฉ์ ์ ๋ฐ๋ก ํฌํํ ์ ์๊ฒ ๋ณ๊ฒฝ * Merge branch 'main' of https://github.com/BestSprinters/i-Konnect into feat/chart * โจ feat: ํฌ๋ ๋ง์์ด ํฌํํ๋ฉด NoCreditModal ๋์ * ๐ฆ chore: merge๋ก์ธํด ์ค๋ณต๋ ์ฝ๋ ์์ --- src/components/Chart.jsx | 18 ++++++++---------- src/components/MyCredit.jsx | 2 +- src/components/SponsorCard.jsx | 2 +- src/components/VoteModal.jsx | 14 +++++++------- src/hooks/useToggle.js | 2 +- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/components/Chart.jsx b/src/components/Chart.jsx index b8baba8..f1e731f 100644 --- a/src/components/Chart.jsx +++ b/src/components/Chart.jsx @@ -1,7 +1,4 @@ -import { useContext } from 'react'; - import chartIcon from '../assets/imgs/ic_chart.svg'; -import CreditContext from '../contexts/CreditAmount'; import useChartLoader from '../hooks/useChartLoader'; import useMediaQuery from '../hooks/useMediaQuery'; import useToggle from '../hooks/useToggle'; @@ -9,12 +6,13 @@ import Button from './Button'; import ChartList from './ChartList'; import ChartMoreButton from './ChartMoreButton'; import ChoiceGender from './ChoiceGender'; +import NoCreditModal from './NoCreditModal'; import VoteModal from './VoteModal'; function Chart() { - const { creditAmount, setCreditAmount } = useContext(CreditContext); const matches = useMediaQuery('(min-width: 1280px)'); - const { toggle, handleToggle } = useToggle(); + const [voteToggle, handleVoteToggle] = useToggle(); + const [noCreditToggle, handleNoCreditToggle] = useToggle(); const { chartList, hasMore, updateChartOption, setChartList, chartOption } = useChartLoader({ gender: 'female', @@ -28,7 +26,7 @@ function Chart() {