Skip to content

Commit

Permalink
[mobile] 홈에서 식단 카드 클릭 시 식단 페이지로 이동 (#975)
Browse files Browse the repository at this point in the history
* fix: 홈에서 식단 카드 클릭 시 식단 페이지로 이동

* fix: 식단 없을 경우 Link 추가
  • Loading branch information
nohgijin authored Aug 25, 2023
1 parent 55ec398 commit f223aa8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Link } from "react-router-dom";

import classNames from "classnames";
import BorderBox from "src/components/atoms/BorderBox";
import { Write } from "src/components/atoms/icon";
Expand Down Expand Up @@ -27,9 +29,9 @@ function EmptyCafeteria({ className, cafeteriaName, onClick }: Props) {
</button>
</div>
<Line />
<div className={$["food-box"]}>
<Link to="/cafeteria" className={$["food-box"]}>
<span className={$["empty-menu"]}>지금은 식단이 없어요</span>
</div>
</Link>
</BorderBox>
);
}
Expand Down
12 changes: 5 additions & 7 deletions packages/mobile/src/page/Home/Restaurant/Selected/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Link } from "react-router-dom";

import { CafeteriaMenu } from "@shared/swagger-api/generated";
import classNames from "classnames";
import { Dayjs } from "dayjs";
Expand Down Expand Up @@ -71,13 +73,9 @@ function Selected(props: Props) {
<span className={$.time}>{mealPeriod}</span>
</div>
<Line />
<div className={$["food-box"]}>
{menuData.menu ? (
<p className={$["cafeteria-content"]}>{menuData.menu}</p>
) : (
<span className={$["empty-menu"]}>지금은 식단이 없어요</span>
)}
</div>
<Link to="/cafeteria" className={$["food-box"]}>
<p className={$["cafeteria-content"]}>{menuData.menu}</p>
</Link>
</BorderBox>
);
}
Expand Down

0 comments on commit f223aa8

Please sign in to comment.