1
0
Fork 0

fix: my shares doesn't make an api request

This commit is contained in:
Elias Schneider 2022-10-14 11:29:54 +02:00
parent a50d16dcff
commit 247ce92744
2 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
backend/dist/
backend/node_modules/
backend/data
frontend/node_modules/
frontend/.next/
frontend/dist/
**/.git/

View File

@ -15,7 +15,7 @@ import { useModals } from "@mantine/modals";
import { NextLink } from "@mantine/next";
import moment from "moment";
import { useRouter } from "next/router";
import { useState } from "react";
import { useEffect, useState } from "react";
import { Link, Trash } from "tabler-icons-react";
import Meta from "../../components/Meta";
import useUser from "../../hooks/user.hook";
@ -31,9 +31,9 @@ const MyShares = () => {
const [shares, setShares] = useState<MyShare[]>();
// useEffect(() => {
// shareService.getMyShares().then((shares) => setShares(shares));
// }, []);
useEffect(() => {
shareService.getMyShares().then((shares) => setShares(shares));
}, []);
if (!user) {
router.replace("/");