Skip to content

Commit

Permalink
modify: css최종수정완료
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsoohyeon committed Nov 24, 2023
1 parent cdcc467 commit 5af7b8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/MenuBar/MenuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const MenuBar = () => {
.then((response) => response.json())
.then((data) => {
setUserName(data.userName);
setUserRole(data.userRole === '1' ? '참여자' : '관리자');
setUserRole(data.userRole === 1 ? '관리자' : '참여자');
})
.catch((error) => {
console.error('로그인 정보를 불러오는 중 에러:', error);
Expand All @@ -72,7 +72,7 @@ const MenuBar = () => {
<ul>
{BUTTONS.map(
(button, index) =>
!(userRole === '0' && button.text === '가계부 설정') && ( //userRole이 0이면서, button.text가 가계부 설정이면 렌더링하지않음
!(setUserRole === 0 && button.text === '가계부 설정') && ( //userRole이 0이면서, button.text가 가계부 설정이면 렌더링하지않음
<li key={index} className="buttonList">
<button
className={`menuBarButton${button.isRed ? ' red' : ''}`}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Main/GraphBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const GraphBarChart = ({ data }) => {
transformedData.push(newData);
}

const tickFormatY = (tickItem) => tickItem.toLocaleString();

return (
<BarChart
width={580}
Expand All @@ -40,7 +42,7 @@ const GraphBarChart = ({ data }) => {
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="name" />
<YAxis />
<YAxis tickFormatter={tickFormatY} />
<Tooltip />
<Legend />
<Bar
Expand Down

0 comments on commit 5af7b8e

Please sign in to comment.