fix: my shares doesn't make an api request
This commit is contained in:
@@ -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/
|
||||||
|
|||||||
@@ -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("/");
|
||||||
|
|||||||
Reference in New Issue
Block a user