Skip to content

Commit 71f6b77

Browse files
authored
Merge pull request #8514 from Couchers-org/web/fix/dashboard-reminder-card
Fix dashboard reminder card colors and host request title
2 parents 72bc9c8 + 80c7d52 commit 71f6b77

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

app/web/features/dashboard/ReminderItem.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ describe("ReminderItem", () => {
2525
);
2626

2727
expect(
28-
screen.getByText(t("dashboard:reminder.respond_to_host_request.title")),
28+
screen.getByText(
29+
t("dashboard:reminder.respond_to_host_request.title", {
30+
name: surferUser.name,
31+
}),
32+
),
2933
).toBeVisible();
3034
expect(
3135
screen.getByText(

app/web/features/dashboard/ReminderItem.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Typography, useColorScheme } from "@mui/material";
1+
import { alpha, Box, Typography } from "@mui/material";
22
import { useMediaQuery } from "@mui/system";
33
import Button from "components/Button";
44
import { useTranslation } from "i18n";
@@ -21,24 +21,19 @@ export default function ReminderItem({
2121
reminder: Reminder.AsObject;
2222
}) {
2323
const { t } = useTranslation([DASHBOARD]);
24-
const { mode, systemMode } = useColorScheme();
2524

2625
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
2726

28-
const resolvedMode = mode === "system" ? systemMode : mode;
29-
const isDark = resolvedMode === "dark";
30-
3127
let title: string;
3228
let description: string;
3329
let buttonText: string;
3430
let href: string;
3531

3632
if (reminder.respondToHostRequestReminder) {
3733
const { hostRequestId, surferUser } = reminder.respondToHostRequestReminder;
38-
title = t("reminder.respond_to_host_request.title");
39-
description = t("reminder.respond_to_host_request.description", {
40-
name: surferUser?.name ?? "",
41-
});
34+
const name = surferUser?.name ?? "";
35+
title = t("reminder.respond_to_host_request.title", { name });
36+
description = t("reminder.respond_to_host_request.description", { name });
4237
buttonText = t("reminder.respond_to_host_request.button");
4338
href = routeToHostRequest(hostRequestId);
4439
} else if (reminder.writeReferenceReminder?.otherUser) {
@@ -71,7 +66,7 @@ export default function ReminderItem({
7166
return (
7267
<Box
7368
sx={(theme) => ({
74-
backgroundColor: isDark ? "#716317" : "#fff5e4",
69+
backgroundColor: alpha(theme.palette.secondary.main, 0.08),
7570
padding: isMobile ? "20px" : "24px",
7671
display: "flex",
7772
flexDirection: "column",

app/web/features/dashboard/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
},
6868
"reminder": {
6969
"respond_to_host_request": {
70-
"title": "Respond to host request",
71-
"description": "Don't forget to respond to {{name}} about their stay.",
70+
"title": "Respond to {{name}}",
71+
"description": "Don't forget to respond to the host request by {{name}}.",
7272
"button": "View request"
7373
},
7474
"write_reference": {

0 commit comments

Comments
 (0)