์ „์ฒด ๊ธ€

๐Ÿ‘ฉ‍๐Ÿ’ป java, mysql, android, php, javascript๋ฅผ ๋‹ค๋ฃน๋‹ˆ๋‹ค
console.log(combinedData); ์ฐ์œผ๋‹ˆ ์ด์ œ date๋ณ„๋กœ data๊ฐ€ ๋‚˜์˜ค๊ฒŒ ๋˜์—ˆ๋‹ค. ํ•˜์ง€๋งŒ ๊ฐ์ž ์†์„ฑ์ด ๋‹ค๋ฅธ ๊ณ„์ขŒ ๋ฐ์ดํ„ฐ์™€ ํ˜„๊ธˆ ๋ฐ์ดํ„ฐ... ๋ฆฌํ„ด๋ฌธ์œผ๋กœ ๋ Œ๋”๋งํ• ๋•Œ ์กฐ๊ธˆ ์‹ ๊ฒฝ์„ ์จ์ค˜์•ผ ํ–ˆ๋‹ค export default function MonthConsumptionDetail({ combinedData, }: { combinedData: CombinedData[]; }) { const detailBoxRef = useRef(null); useEffect(() => { if (detailBoxRef.current) { const itemCount = combinedData?.reduce( (height, group) => height + group.data.length, 0 ) || 0; con..
export default function MonthConsumptionContainer({ years, month, setYears, setMonth, monthSumData, groupedData, cashGroupedData, }: { years: number; month: number; setYears: Dispatch; setMonth: Dispatch; monthSumData: MonthSumData | Record; groupedData: GroupedData[]; cashGroupedData: CashGroupedData[]; }) { //6์›” ๋ฐ์ดํ„ฐ์™€ 7์›” ๋ฐ์ดํ„ฐ๋ฅผ ๋‚˜๋ˆ ์„œ, 6์›” ๋ฐ•์Šค์˜ ๋†’์ด๋งŒ ์ปค์ง€๊ฒŒ ํ•˜์ง€ ์•Š๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค const monthData = groupedData.filter( (..
ยท React
๊ธฐ์กด useEffect(() => { const setBoxHeight = () => { if (detailBoxRef.current) { const itemHeight = 4.5; const itemCount = groupedData.reduce((count, group) => count + group.data.length, 0); const calculatedHeight = itemHeight * itemCount + 3 * itemCount; detailBoxRef.current.style.height = `${calculatedHeight}vh`; } }; setBoxHeight(); }, [groupedData, detailBoxRef]); ์ˆ˜์ •ํ›„ useEffect(() => { if (deta..
ยท React
import { useCallback } from "react"; // ... Your imports and other code ... export default function DayPage() { // ... Your state declarations ... // Function to fetch data using useCallback const handleFetchData = useCallback(() => { dayRender(userId, month, date) .then((response) => { // ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ ๋กœ์ง //console.log(response.data.data); setDayConsumptionData(response.data.data.paymentResponses); //..
ยท React
์„œ๋ฒ„์—์„œ ๋ฐ์ดํ„ฐ๋Š” ๋“ค์–ด์™”๋Š”๋ฐ, ๋ Œ๋”๋ง์ด ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค useEffect(() => { const handleFetchData = () => { dayRender(userId, month, date) .then((response) => { // ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ ๋กœ์ง console.log(response.data); console.log(response.data.data) setDayConsumptionData(response.data.data.paymentResponses); setDaySumData(response.data.data.daySummary); }) .catch((error) => { // ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋กœ์ง console.log(error); }); }; handleFetchData(); },..
์„œ๋ฒ„์™€ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฐ๊ฒฐํ•˜๋‹ค ๋ณด๋ฉด, ๊ฐ€์žฅ ๋จผ์ € ๋งˆ์ฃผํ•˜๋Š” ์—๋Ÿฌ๋Š” cors ์—๋Ÿฌ์ด๋‹ค. CORS๋Š” ๋ณด์•ˆ ์ƒ์˜ ์ด์œ ๋กœ ์ธํ•ด ๋ธŒ๋ผ์šฐ์ €์—์„œ ์‹คํ–‰ ์ค‘์ธ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋‹ค๋ฅธ ์ถœ์ฒ˜(๋„๋ฉ”์ธ, ํ”„๋กœํ† ์ฝœ, ํฌํŠธ)์˜ ๋ฆฌ์†Œ์Šค์— ์ ‘๊ทผํ•˜๋Š” ๊ฒƒ์„ ์ œํ•œํ•˜๋Š” ์ •์ฑ…์ด๋‹ค. ๋”ฐ๋ผ์„œ, ์š”์ฒญ์„ ๋ณด๋‚ด๋Š” ํด๋ผ์ด์–ธํŠธ์—์„œ CORS ์—๋Ÿฌ๋ฅผ ํ”ผํ•˜๋ ค๋ฉด ์˜ฌ๋ฐ”๋ฅธ CORS ํ—ค๋”๋ฅผ ํฌํ•จํ•˜๋Š” ์š”์ฒญ์„ ๋ณด๋‚ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด ์š”์ฒญ ํ—ค๋”์— ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ CORS ์ •์ฑ…์„ ์ค€์ˆ˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, Access-Control-Allow-Origin ํ—ค๋”๋ฅผ ์„ค์ •ํ•˜์—ฌ ํ—ˆ์šฉ๋œ ์ถœ์ฒ˜๋ฅผ ๋ช…์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, Access-Control-Allow-Origin ํ—ค๋”๋ฅผ ์„ค์ •ํ•˜์˜€์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์œ„์˜ ์ฝ”๋“œ์—์„œ๋Š” "ngrok-skip-browser-..
ยท Github
์ดˆ๊ธฐ์„ธํŒ…์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ, setting ๋ธŒ๋žœ์น˜๋ฅผ dev(ํŒ€์›๋“ค์ด๋ž‘ ๊ฐ™์ด ์“ฐ๋Š” ๋ธŒ๋žœ์น˜)๋กœ merge ํ•˜๋Š” pr์„ ๋‚ ๋ฆฌ๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ, ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‹ค. There isn't anything to compare. dev and setting are entirely different commit histories. ๋น„๊ตํ•  ๊ฒƒ์ด ์—†๋‹ค. dev์™€ setting ์€ ์™„์ „ํžˆ ๋‹ค๋ฅธ ์ปค๋ฐ‹๋‚ด์—ญ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค ์›์ธ์„ ์ฐพ์ง€ ๋ชปํ•˜๋‹ค๊ฐ€, ๊ฐ ๋ธŒ๋žœ์น˜๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ํด๋”๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์„œ ๋น„๊ต์ž์ฒด๋ฅผ ๋ชปํ•˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค๋Š” ํŒ€์›์˜ ๋ง์— ๊ฐ ๋ธŒ๋žœ์น˜์˜ ํด๋”๊ตฌ์กฐ๋ฅผ ์‚ดํŽด๋ณด์•˜๋‹ค ์•„์˜ˆ ์ƒ์œ„ํด๋” ๊ตฌ์กฐ ๋ถ€ํ„ฐ ๋‹ฌ๋ผ์„œ pr์ด ๋ถˆ๊ฐ€๋Šฅํ–ˆ๋˜ ๊ฒƒ์ด๋‹ค. ์•„๋งˆ ๊นƒ ํด๋ก ์„ ๋ฐ›์„๋•Œ ์›๊ฒฉ main ๋ธŒ๋žœ์น˜(์•„๋ฌด๊ฒƒ๋„ ์—†๋˜)์—์„œ ๊ฐ€์ ธ์™€์„œ setting์˜ ํด๋”๊ตฌ์กฐ๊ฐ€ dev์™€ ๋‹ค๋ฅด๊ฒŒ ๋‚˜..
ยท Github
git push origin ๋ณธ์ธ์ด๋ฆ„/์ž‘์—…๋‚ด์šฉ์„ ์ž…๋ ฅํ•˜๋ฉด? ์ง€๊ธˆ ์œ„์น˜ํ•ด์žˆ๋Š” ๋กœ์ปฌ๋ธŒ๋žœ์น˜์˜ ๋‚ด์šฉ์„ ๋ณต์‚ฌํ•ด์„œ, ์›๊ฒฉ์—์„œ ‘๋ณธ์ธ์ด๋ฆ„/์ž‘์—…๋‚ด์šฉ’ ๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์ƒˆ๋กœ์šด ๋ธŒ๋žœ์น˜๊ฐ€ ์ƒ๊ธด๋‹ค ์ฆ‰, ๋กœ์ปฌ์—์„œ ๋งŒ๋“  ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ ๋ธŒ๋žœ์น˜๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด๋‹ค! ์˜ฌ๋ฐ”๋ฅธ ๊ฐ€์ด๋“œ๋ผ์ธ์€ ์ž‘์—…ํ•œ ๋‚ด์šฉ์„ ์‹๋ณ„ ๊ฐ€๋Šฅํ•œ ๋ฐฉ์‹์œผ๋กœ ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๋ฅผ ๋ช…๋ช…ํ•˜๊ณ , ํ•ด๋‹น ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ์ €์žฅ์†Œ๋กœ ํ‘ธ์‹œํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋กœ์ปฌ์ €์žฅ์†Œ์˜ ํ˜„์žฌ ๋ธŒ๋žœ์น˜๋ฅผ ์›๊ฒฉ์ €์žฅ์†Œ์— ํ‘ธ์‹œํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: 1. ์ƒˆ๋กœ์šด ๋กœ์ปฌ ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ํ˜„์žฌ ๋กœ์ปฌ ๋ธŒ๋žœ์น˜์˜ ๋‚ด์šฉ์„ ํ•ด๋‹น ๋กœ์ปฌ๋ธŒ๋žœ์น˜๋กœ ์ด๋™์‹œํ‚ต๋‹ˆ๋‹ค. git branch ๋ณธ์ธ์ด๋ฆ„/์ž‘์—…๋‚ด์šฉ git checkout ๋ณธ์ธ์ด๋ฆ„/์ž‘์—…๋‚ด์šฉ ์ด ๋ช…๋ น์–ด๋Š” ๋ณธ์ธ์ด๋ฆ„/์ž‘์—…๋‚ด์šฉ์ด๋ผ๋Š” ์ด๋ฆ„์˜ ์ƒˆ๋กœ์šด ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜๊ณ , ํ•ด๋‹น ๋ธŒ..
becky(์ง€์€)
Know yourself, follow your passion