Skip to content

Commit

Permalink
Fix PR #346 comments (#367)
Browse files Browse the repository at this point in the history
* feat(MatchDetail): improve error message

* feat(MatchDetail): link branch hours in StandMatch
  • Loading branch information
LarsSelbekk authored Aug 29, 2023
1 parent 29ef591 commit e908c15
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/info/BranchInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const BranchInfo = ({
)}
{openingHours.length === 0 && (
<>
<Alert severity="info" data-testid="noHours">
Sesongen er over - eller åpningstidene er ikke klare enda. Du kan
<Alert severity="info" data-testid="noHours" sx={{ my: 4 }}>
Sesongen er over eller åpningstidene er ikke klare enda. Du kan
bestille bøker i Posten, eller kontakte oss for spørsmål.
</Alert>
<ContactInfo />
Expand Down
7 changes: 6 additions & 1 deletion src/components/matches/MatchDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const MatchDetail = ({ matchId }: { matchId: string }) => {
);

if (tokenError || matchesError) {
return <Alert severity="error">En feil har oppstått.</Alert>;
return (
<Alert severity="error">
En feil har oppstått. Ta kontakt med info@boklisten.no dersom problemet
vedvarer.
</Alert>
);
}

const match = matches?.find((match) => match.id === matchId);
Expand Down
12 changes: 11 additions & 1 deletion src/components/matches/MeetingInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { formatDatetime } from "./matchesList/helper";
import React from "react";
import PlaceIcon from "@mui/icons-material/Place";
import { MatchWithDetails } from "@boklisten/bl-model";
import DynamicLink from "../DynamicLink";

const MeetingInfo = ({ match }: { match: MatchWithDetails }) => {
const meetingTime = match.meetingInfo.date;
Expand All @@ -25,7 +26,16 @@ const MeetingInfo = ({ match }: { match: MatchWithDetails }) => {
{formatDatetime(new Date(meetingTime))}
</Typography>
</>
)) || <>Du kan møte opp når som helst i skolens åpningstider</>}
)) || (
<>
<Typography sx={{ whiteSpace: "pre" }}>
Du kan møte opp når som helst i{" "}
<DynamicLink variant="body1" href="/info/branch/select">
skolens åpningstider
</DynamicLink>
</Typography>
</>
)}
</Box>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/matches/UserMatchDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const UserMatchDetail = ({
)}
{fulfilledItems.length !== otherPersonFulfilledItems.length &&
isSender && (
<Alert severity={"warning"} sx={{ mt: "1rem" }}>
<Alert severity={"warning"} sx={{ marginBottom: "1rem" }}>
Noen av bøkene du har levert har vært på andres vegne. Ta kontakt
med stand for mer informasjon.
</Alert>
Expand Down

1 comment on commit e908c15

@vercel
Copy link

@vercel vercel bot commented on e908c15 Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

bl-next – ./

bl-next-git-production-boklisten.vercel.app
bl-next-boklisten.vercel.app
next.boklisten.no

Please sign in to comment.