Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: old listings #2064

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading