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/dist/
backend/node_modules/ backend/node_modules/
backend/data
frontend/node_modules/ frontend/node_modules/
frontend/.next/ frontend/.next/
frontend/dist/
**/.git/ **/.git/

View File

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