Skip to content

Commit

Permalink
Merge branch 'dev' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jaryapp committed Sep 4, 2023
2 parents 7b983a8 + 1c971aa commit f622013
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
17 changes: 8 additions & 9 deletions packages/mobile/src/components/templates/Modal/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@
margin-top: 25px;

.cancel {
width: 96px;
height: 40px;
border-radius: 100px;
background-color: $white;
color: $black-40;
border: 0.3px solid $black-40;
width: 120px;
height: 47px;
border-radius: 10px;
background-color: $black-10;
color: $black-80;
}

.confirm {
width: 96px;
height: 40px;
border-radius: 100px;
width: 120px;
height: 47px;
border-radius: 10px;
background-color: $red-50;
color: $white;

Expand Down
10 changes: 8 additions & 2 deletions packages/mobile/src/page/Home/Restaurant/Selected/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ const getMealTime = (hour: number) => {
return CafeteriaMenu.time.DINNER;
};

const Priority: Record<CafeteriaMenu.time, number> = {
[CafeteriaMenu.time.BREAKFAST]: 1,
[CafeteriaMenu.time.LUNCH]: 2,
[CafeteriaMenu.time.DINNER]: 3,
};

function Selected(props: Props) {
const { today, cafeteriaData, cafeteriaName, onClick, className } = props;
const fullDate = today.format("YYYY-MM-DD");
Expand All @@ -38,7 +44,7 @@ function Selected(props: Props) {
const { data: isHoliday } = useHoliday(fullDate);
const { data } = useCafeteriaQuery(cafeteriaData, fullDate);
const menuData = data?.find(({ time }) => {
return time === getMealTime(today.hour());
return Priority[time] >= Priority[getMealTime(today.hour())];
});

if (!data || isHoliday === undefined) return null;
Expand Down Expand Up @@ -73,7 +79,7 @@ function Selected(props: Props) {
<span className={$.time}>{mealPeriod}</span>
</div>
<Line />
<Link to="/cafeteria" className={$["food-box"]}>
<Link to={`/cafeteria?menu=${cafeteriaData}`} className={$["food-box"]}>
<p className={$["cafeteria-content"]}>{menuData.menu}</p>
</Link>
</BorderBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ $total-margin-of-top-and-bottom: 220px;
.cancel {
@include typography(14);
position: relative;
width: 96px;
height: 40px;
width: 120px;
height: 47px;
margin-bottom: 27px;
color: $black-60;
background-color: $black-0;
border: 1px solid $black-50;
border-radius: 100px;
color: $black-80;
background-color: $black-10;
border-radius: 10px;
line-height: 30px;
z-index: 1;
}
Expand Down

0 comments on commit f622013

Please sign in to comment.