From e752cb23cd662c52b438740c402db81ac9ce080d Mon Sep 17 00:00:00 2001 From: tushar5526 Date: Mon, 30 May 2022 01:46:38 +0530 Subject: [PATCH] Added a Link section which displays Links Stats --- yaus/apps/admin/src/app/app.tsx | 3 ++- .../app/components/Dashboard/Dashboard.tsx | 4 +++- .../app/components/Dashboard/Links/Links.tsx | 21 +++++++++++++++++++ .../app/components/Dashboard/Links/index.ts | 3 +++ yaus/apps/admin/src/app/posts.tsx | 20 ------------------ 5 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 yaus/apps/admin/src/app/components/Dashboard/Links/Links.tsx create mode 100644 yaus/apps/admin/src/app/components/Dashboard/Links/index.ts delete mode 100644 yaus/apps/admin/src/app/posts.tsx diff --git a/yaus/apps/admin/src/app/app.tsx b/yaus/apps/admin/src/app/app.tsx index 4efdc547..f46b9d70 100644 --- a/yaus/apps/admin/src/app/app.tsx +++ b/yaus/apps/admin/src/app/app.tsx @@ -6,6 +6,7 @@ import { useState, useEffect } from 'react'; import Dashboard from './components/Dashboard'; import { createBrowserHistory as createHistory } from 'history'; +import Links from './components/Dashboard/Links'; const history = createHistory(); const createApolloClient = async () => { @@ -41,7 +42,7 @@ const App = () => { dashboard={Dashboard} history={history} > - + ) }; diff --git a/yaus/apps/admin/src/app/components/Dashboard/Dashboard.tsx b/yaus/apps/admin/src/app/components/Dashboard/Dashboard.tsx index 7586fb01..872a6928 100644 --- a/yaus/apps/admin/src/app/components/Dashboard/Dashboard.tsx +++ b/yaus/apps/admin/src/app/components/Dashboard/Dashboard.tsx @@ -1,3 +1,5 @@ -const Dashboard = () => {return <>}; +const Dashboard = () => { + return <>"Welcome to Dashboard"; +}; export default Dashboard; diff --git a/yaus/apps/admin/src/app/components/Dashboard/Links/Links.tsx b/yaus/apps/admin/src/app/components/Dashboard/Links/Links.tsx new file mode 100644 index 00000000..fd0b2622 --- /dev/null +++ b/yaus/apps/admin/src/app/components/Dashboard/Links/Links.tsx @@ -0,0 +1,21 @@ +// in src/posts.js +import { + List, + Datagrid, + TextField, + DateField, + BooleanField, + NumberField, +} from 'react-admin'; + +const Links = () => ( + + + + + + + +); + +export default Links; diff --git a/yaus/apps/admin/src/app/components/Dashboard/Links/index.ts b/yaus/apps/admin/src/app/components/Dashboard/Links/index.ts new file mode 100644 index 00000000..c330dc81 --- /dev/null +++ b/yaus/apps/admin/src/app/components/Dashboard/Links/index.ts @@ -0,0 +1,3 @@ +import Links from './Links'; + +export default Links; \ No newline at end of file diff --git a/yaus/apps/admin/src/app/posts.tsx b/yaus/apps/admin/src/app/posts.tsx deleted file mode 100644 index 0e6bb5ca..00000000 --- a/yaus/apps/admin/src/app/posts.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import * as React from "react"; -import { - List, - Datagrid, - TextField, - DateField, - BooleanField -} from "react-admin"; - -export const PostList = (props: any) => ( - - - - - - - - - -); \ No newline at end of file