From a0eb4ee4cf5ad3dde070960a4c48172fa10792de Mon Sep 17 00:00:00 2001 From: Nirmalya Ghosh Date: Sat, 1 Aug 2020 16:20:20 +0530 Subject: [PATCH] fix: fixes build error --- .../access-denied-indicator/index.tsx | 10 ++++-- frontend/pages/users.tsx | 31 ------------------- 2 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 frontend/pages/users.tsx diff --git a/frontend/components/access-denied-indicator/index.tsx b/frontend/components/access-denied-indicator/index.tsx index f39917bc..885cb954 100644 --- a/frontend/components/access-denied-indicator/index.tsx +++ b/frontend/components/access-denied-indicator/index.tsx @@ -3,7 +3,13 @@ import { Icon, Flex, Button, Stack, Box } from "@chakra-ui/core"; import Link from "next/link"; import { signIn } from "next-auth/client"; -const AccessDeniedIndicator: FC = () => { +interface IProps { + message?: string; +} + +const AccessDeniedIndicator: FC = ({ + message = "You need to Sign In to view this content!", +}) => { const iconNode = () => { return ; }; @@ -18,7 +24,7 @@ const AccessDeniedIndicator: FC = () => { signIn(); }} > - You need to Sign In to view this content! + {message} ); diff --git a/frontend/pages/users.tsx b/frontend/pages/users.tsx deleted file mode 100644 index 189aaa40..00000000 --- a/frontend/pages/users.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from "react"; -import Head from "next/head"; -import Page from "components/pages/users"; -import { NextPage } from "next"; -import Loader from "components/loader"; -import AccessDeniedIndicator from "components/access-denied-indicator"; -import { useSession } from "next-auth/client"; -import WithGraphQL from "lib/with-graphql"; - -const UsersPage: NextPage = () => { - const [session, loading] = useSession(); - - if (loading) { - return ; - } - - if (!session) { - return ; - } - - return ( - - - Users Page - - - - ); -}; - -export default UsersPage;