70 |
Login with your credentials
71 |
72 | {
73 | !loading ?
74 |
93 | :
94 |
95 | }
96 |
97 | );
98 | };
99 |
100 | export default LoginPage;
--------------------------------------------------------------------------------
/social-media-client/src/pages/SinglePost/SinglePost.tsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from "react";
2 | import { useParams } from "react-router-dom";
3 | import { useQuery } from "@apollo/client";
4 | import moment from "moment";
5 | import { ProgressSpinner } from "primereact/progressspinner";
6 | import { Card } from "primereact/card";
7 | import { Avatar } from "primereact/avatar";
8 | import { Divider } from "primereact/divider";
9 |
10 | import AuthContext from "../../data/auth-context";
11 | import { gqlQueries } from "../../graphql/queries";
12 | import { IGetPostData, IGetPostPayload } from "../../graphql/models/post.model";
13 | import LikeButton from "../../components/LikeButton/LikeButton";
14 | import DeleteButton from "../../components/DeleteButton/DeleteButton";
15 | import CommentForm from "../../components/CommentForm/CommentForm";
16 |
17 | const SinglePostPage: React.FC = () => {
18 |
19 | const { user } = useContext(AuthContext);
20 | const { postId } = useParams<{postId: string}>();
21 |
22 | const { data } = useQuery