Skip to content

Commit

Permalink
feat(UserMatchDetail): Add warning to scan books (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsSelbekk authored Aug 22, 2023
1 parent 6cf4637 commit f139891
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/matches/Scanner/Scanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const Scanner = ({ forceUpdate }: { forceUpdate: () => void }) => {
sx={{
display: "flex",
flexDirection: "column",
alignItems: "center",
gap: "1rem",
}}
>
<ScannerTutorial />
Expand Down
1 change: 0 additions & 1 deletion src/components/matches/Scanner/ScannerTutorial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const ScannerTutorial = () => {
<>
<Button
variant={"contained"}
sx={{ mb: "2rem" }}
onClick={() => setTutorialOpen(true)}
startIcon={<QuestionMarkIcon />}
>
Expand Down
18 changes: 13 additions & 5 deletions src/components/matches/UserMatchDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Alert } from "@mui/material";
import { Alert, Box, Typography } from "@mui/material";
import React, { useCallback, useState } from "react";
import { UserMatchWithDetails } from "../../utils/types";
import {
Expand Down Expand Up @@ -72,17 +72,25 @@ const UserMatchDetail = ({
}
/>

<Box>
<Typography variant="h2">Hvordan fungerer det?</Typography>
<Typography>
Du skal møte en annen elev og utveksle bøker.
Det er viktig at den som mottar bøker scanner hver bok,
hvis ikke blir ikke bøkene registrert som levert, og avsender kan få faktura.
</Typography>
</Box>
<MatchHeader>Du skal møte</MatchHeader>
<OtherPersonContact match={match} currentUserId={currentUserId} />
<MeetingInfo match={match} />

{!isSender && !isFulfilled && (
<>
<MatchHeader>Når du skal motta bøkene</MatchHeader>
<Scanner forceUpdate={forceUpdate} />
</>
)}

<MatchHeader>Du skal møte</MatchHeader>
<OtherPersonContact match={match} currentUserId={currentUserId} />
<MeetingInfo match={match} />

<MatchHeader>
Du skal {isSender ? "levere" : "motta"} disse bøkene
</MatchHeader>
Expand Down

1 comment on commit f139891

@vercel
Copy link

@vercel vercel bot commented on f139891 Aug 22, 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-boklisten.vercel.app
next.boklisten.no
bl-next-git-production-boklisten.vercel.app

Please sign in to comment.