From 6ad3384a78f7bcb03f409cce8b35cc61d634d6b2 Mon Sep 17 00:00:00 2001 From: sct Date: Mon, 23 Nov 2020 16:13:29 +0000 Subject: [PATCH] feat(frontend): add links to detail pages from new request card --- src/components/RequestCard/index.tsx | 33 ++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/components/RequestCard/index.tsx b/src/components/RequestCard/index.tsx index f6d52f507..58a0e4866 100644 --- a/src/components/RequestCard/index.tsx +++ b/src/components/RequestCard/index.tsx @@ -13,6 +13,7 @@ import { useUser, Permission } from '../../hooks/useUser'; import axios from 'axios'; import Button from '../Common/Button'; import { withProperties } from '../../utils/typeHelpers'; +import Link from 'next/link'; const isMovie = (movie: MovieDetails | TvDetails): movie is MovieDetails => { return (movie as MovieDetails).title !== undefined; @@ -76,8 +77,17 @@ const RequestCard: React.FC = ({ request }) => { }} >
-

- {isMovie(title) ? title.title : title.name} +

+ + {isMovie(title) ? title.title : title.name} +

Requested by {requestData.requestedBy.username} @@ -155,11 +165,20 @@ const RequestCard: React.FC = ({ request }) => { )}
- + + +
);