Skip to content

Commit 68515c1

Browse files
committed
design: fix padding, layout
1 parent 2444061 commit 68515c1

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/components/shopping/ShoppingBudget.jsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ const BudgetInput = styled.input`
9999
function ShoppingBudget({ budget, present, hideButtons }) {
100100
const [isEditing, setIsEditing] = useState(false);
101101
const [newBudget, setNewBudget] = useState();
102-
const state = budget === 0 ? 0 : budget - present;
102+
const state = budget === 0 ? 0 : Number((budget - present).toFixed(3));
103+
const formattedBudget = Number(budget.toFixed(3));
104+
const formattedPresent = Number(present.toFixed(3));
103105
const { token } = useUser();
104106

105107
const handleSetBudget = async () => {
@@ -169,12 +171,12 @@ function ShoppingBudget({ budget, present, hideButtons }) {
169171
<ContentContainer>
170172
<FiDollarSign color="#daa520" size={32} />
171173
<Text className="budget">예산</Text>
172-
<Text className="money">{`${budget}`}</Text>
174+
<Text className="money">{`${formattedBudget}`}</Text>
173175
</ContentContainer>
174176
<ContentContainer>
175177
<FiDollarSign color="#47572f" size={32} />
176178
<Text className="present">현재</Text>
177-
<Text className="money">{`${present}`}</Text>
179+
<Text className="money">{`${formattedPresent}`}</Text>
178180
</ContentContainer>
179181
<hr color="#432a00" width="520px" height="1px" />
180182
<ContentContainer>

src/pages/price/PriceCategorySearchPage.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const PriceWrapper = styled.div`
2020
flex-direction: column;
2121
justify-content: center;
2222
align-items: center;
23-
padding-top: 60px;
23+
padding: 60px 0;
2424
gap: 20px;
2525
`;
2626

src/pages/price/PriceMainPage.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const PriceWrapper = styled.div`
2020
flex-direction: column;
2121
justify-content: center;
2222
align-items: center;
23-
padding-top: 60px;
23+
padding: 60px 0;
2424
gap: 20px;
2525
`;
2626

src/pages/price/PriceNameSearchPage.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const PriceWrapper = styled.div`
1919
flex-direction: column;
2020
justify-content: center;
2121
align-items: center;
22-
padding-top: 60px;
22+
padding: 60px 0;
2323
gap: 20px;
2424
`;
2525

0 commit comments

Comments
 (0)