Skip to content

Commit

Permalink
fix: old listings
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnusHafstad committed Aug 20, 2024
1 parent 35f7a65 commit 6c4689e
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions frontend/src/components/pages/listings/detail/TitleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowForward } from "@mui/icons-material";
import { Box, Button, Card, CardContent, Divider, Grid, Typography } from "@mui/material";
import { Box, Button, Card, CardContent, Divider, Grid, Tooltip, Typography } from "@mui/material";
import Image from "next/image";
import React from "react";

Expand Down Expand Up @@ -54,18 +54,21 @@ export const TitleCard: React.FC<Props> = ({ listing }) => {
{`Frist ${dayjs(listing?.deadline).format("LLL")}`}
</Typography>
{link && (
<Grid container item justifyContent="center">
<Button
component={Link}
href={link}
noLinkStyle
variant="contained"
color="primary"
endIcon={<ArrowForward />}
>
Søk her
</Button>
</Grid>
<Tooltip title="Dette fristen for dette vervet har gått ut. Hvis du tror dette er en feil sjekk årstallet på fristen. Hvis du fortsatt tror det er en feil ta kontakt med vervet.">
<Grid container item justifyContent="center">
<Button
component={Link}
href={link}
noLinkStyle
variant="contained"
disabled={dayjs(listing?.deadline).isBefore(dayjs())}
color="primary"
endIcon={<ArrowForward />}
>
Søk her
</Button>
</Grid>
</Tooltip>
)}
</Grid>
</Grid>
Expand Down

0 comments on commit 6c4689e

Please sign in to comment.