Skip to content

Commit

Permalink
feat: add hours warning to resource page (#479)
Browse files Browse the repository at this point in the history
* feat: add hours warning to resource page

* feat: update covid warning

* chore: remove unnecessary fragment from <Resource/>

Co-authored-by: Jeremiah Tabb <[email protected]>
  • Loading branch information
jacobvenable and jollyjerr authored Jul 14, 2021
1 parent 1884037 commit 1b0433e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export default {
address: "Address",
phoneNumber: "Phone Number",
website: "Website",
covidWarning: "COVID-19 may affect normal business hours and operations.",
checkWebsite: "Please check their website for up-to-date info.",
hoursOfOperation: "Hours of Operation",
reportAProblem: "Report a Problem",
services: "Services",
Expand Down
3 changes: 3 additions & 0 deletions packages/common/src/i18n/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ export default {
address: "Dirección",
phoneNumber: "Número de Teléfono",
website: "Sitio Web",
covidWarning:
"COVID-19 puede afectar el horario comercial y las operaciones normales.",
checkWebsite: "Consulte su sitio web para obtener información actualizada.",
hoursOfOperation: "Horas de Operación",
reportAProblem: "Reportar un Problema",
services: "Servicios",
Expand Down
10 changes: 10 additions & 0 deletions packages/web/src/components/Resource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TCategoryDefinition, categories } from "./Categories";

import BannerColorContext from "./BannerColorContext";
import Button from "@material-ui/core/Button/Button";
import Card from "@material-ui/core/Card";
import Container from "@material-ui/core/Container";
import FavoriteResourceFAB from "./FavoriteResourceFAB";
import Image from "material-ui-image";
Expand All @@ -25,6 +26,7 @@ import Services from "./Services";
import { TResource } from "@upswyng/types";
import { Theme } from "@material-ui/core/styles/createMuiTheme";
import Typography from "@material-ui/core/Typography";
import WarningIcon from "@material-ui/icons/Warning";
import { colors } from "@upswyng/common";
import makeStyles from "@material-ui/core/styles/makeStyles";
import { useHistory } from "react-router";
Expand Down Expand Up @@ -110,6 +112,14 @@ export const Resource = () => {
/>
)}
<List component="div">
<ListItem component={Card}>
<ListItemIcon classes={listIconClasses}>
<WarningIcon color="secondary" />
</ListItemIcon>
<ListItemText>{`${t("covidWarning")} ${
!!resource.website ? t("checkWebsite") : ""
}`}</ListItemText>
</ListItem>
{resource.address && (
<ListItem component="div">
<ListItemIcon classes={listIconClasses}>
Expand Down

0 comments on commit 1b0433e

Please sign in to comment.