Skip to content

Commit

Permalink
Merge pull request #65 from boostcampwm-2024/fe/fix/build_error
Browse files Browse the repository at this point in the history
[FE/fix] 빌드 에러 수정
  • Loading branch information
edder773 authored Nov 19, 2024
2 parents 628fae2 + 40784a6 commit bbc942a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/src/hooks/useLotteryCanvas.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRef, useState, useEffect } from 'react';
import { ERASE_RADIUS, ERASE_DISTANCE, WIDTH, HEIGHT } from '@/constants/LotteryConstants';

const useLotteryCanvas = () => {
const UseLotteryCanvas = () => {
const [isCanvasVisible, setIsCanvasVisible] = useState(false);
const [isScratching, setIsScratching] = useState(false);
const canvasRef = useRef<HTMLCanvasElement | null>(null);
Expand Down Expand Up @@ -113,4 +113,4 @@ const useLotteryCanvas = () => {
};
};

export default useLotteryCanvas;
export default UseLotteryCanvas;
4 changes: 2 additions & 2 deletions apps/frontend/src/hooks/useLotteryModal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';

const useLotteryModal = () => {
const UseLotteryModal = () => {
const [isModalOpen, setIsModalOpen] = useState(false);

const openModal = () => setIsModalOpen(true);
Expand All @@ -10,4 +10,4 @@ const useLotteryModal = () => {
return { isModalOpen, openModal, handleConfirm, handleCancel };
};

export default useLotteryModal;
export default UseLotteryModal;
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/Lottery.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import LotteryTicket from '@/components/LotteryTicket';
import LotteryModal from '@/components/LotteryModal';
import LotteryButtons from '@/components/LotteryButtons';
import useLotteryModal from '@/hooks/useLotteryModal';
import useLotteryCanvas from '@/hooks/useLotteryCanvas';
import useLotteryModal from '@/hooks/UseLotteryModal';
import useLotteryCanvas from '@/hooks/UseLotteryCanvas';

const Lottery: React.FC = () => {
const { isModalOpen, openModal, handleCancel, handleConfirm } = useLotteryModal();
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link } from 'react-router-dom';
import { getStepImage } from '@/utils/GetFarmImg';
import GetFarmImg from '@/utils/GetFarmImg';

const Main: React.FC = () => {
const amount: number = 100000000;
Expand All @@ -8,7 +8,7 @@ const Main: React.FC = () => {
<main className="flex flex-col justify-center items-center select-none min-h-screen">
<div
className="flex justify-center items-center bg-no-repeat bg-contain bg-center w-[370px] h-[360px]"
style={{ backgroundImage: `url(${getStepImage(amount)})` }}
style={{ backgroundImage: `url(${GetFarmImg(amount)})` }}
></div>
<nav className="flex justify-center mt-8">
<ul className="flex list-none gap-24">
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/MyPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { Transaction, ApiCrop, Crop } from '@/types/Index';
import { getStepImage } from '@/utils/GetFarmImg';
import GetFarmImg from '@/utils/GetFarmImg';
import Profile from '@/components/Profile';
import CropList from '@/components/CropList';
import TransactionTable from '@/components/TransactionTable';
Expand Down Expand Up @@ -129,7 +129,7 @@ const MyPage: React.FC = () => {
<Profile id={id} modalOpen={modalOpen} />
<div
className="flex justify-center items-center bg-no-repeat bg-contain bg-center w-[300px] h-[280px]"
style={{ backgroundImage: `url(${getStepImage(amount)})` }}
style={{ backgroundImage: `url(${GetFarmImg(amount)})` }}
/>
</div>

Expand Down
4 changes: 3 additions & 1 deletion apps/frontend/src/utils/getFarmImg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const getStepImage = (amount: number) => {
const GetFarmImg = (amount: number) => {
if (amount < 1000000) {
return '/step1.png';
} else if (amount < 10000000) {
Expand All @@ -9,3 +9,5 @@ export const getStepImage = (amount: number) => {
return '/step4.png';
}
};

export default GetFarmImg;
4 changes: 3 additions & 1 deletion apps/frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ module.exports = {
ranking: "url('./assets/main/ranking.png')",
lottery: "url('./assets/main/lottery.png')",
giftBox: "url('./assets/lottery/giftBox.png')",
veggieBox: "url('./assets/lottery/veggieBox.png')"
veggieBox: "url('./assets/lottery/veggieBox.png')",
board1: "url('./assets/market/board1.png')",
board2: "url('./assets/market/board2.png')"
},
keyframes: {
slideDown: {
Expand Down

0 comments on commit bbc942a

Please sign in to comment.