From 9b9355a7decf77a3eb5de949ffc8900333c4da81 Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Tue, 29 Mar 2022 11:54:13 -0700 Subject: [PATCH 1/4] add admin header --- src/components/Global/AdminHeader/index.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/components/Global/AdminHeader/index.tsx diff --git a/src/components/Global/AdminHeader/index.tsx b/src/components/Global/AdminHeader/index.tsx new file mode 100644 index 0000000..8c3ba2e --- /dev/null +++ b/src/components/Global/AdminHeader/index.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import styles from './AdminHeader.module.scss' + +const AdminHeader = () => { + const currentPage = 'Admin Dashboard'; + return ( +
+
+

{currentPage}

+
+
+ ); +}; + +export default AdminHeader; \ No newline at end of file From 8f9f0cfa90a051702166450965ba2939d68ff0e9 Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Tue, 29 Mar 2022 11:54:27 -0700 Subject: [PATCH 2/4] add styling for admin header --- .../Global/AdminHeader/AdminHeader.module.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/components/Global/AdminHeader/AdminHeader.module.scss diff --git a/src/components/Global/AdminHeader/AdminHeader.module.scss b/src/components/Global/AdminHeader/AdminHeader.module.scss new file mode 100644 index 0000000..1a9280d --- /dev/null +++ b/src/components/Global/AdminHeader/AdminHeader.module.scss @@ -0,0 +1,13 @@ +@import '../../../styles/abstracts/_mixins/text'; +@import '../../../styles/abstracts/variables'; + +.pageName { + @include font-header-extra-bold; + width: 100vw; + height: 3.4rem; + padding: 0 1.5rem 3rem; + font-size: 1.5rem; + border-bottom: $grey-transparency 1px solid; + + +} \ No newline at end of file From 0ddd6bf338a041b5fba2d2755a52da172a119ae0 Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Tue, 29 Mar 2022 11:57:22 -0700 Subject: [PATCH 3/4] add admin header to admin page --- src/components/Global/index.tsx | 4 +++- src/pages/admin/index.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Global/index.tsx b/src/components/Global/index.tsx index 8e97c52..06ca77e 100644 --- a/src/components/Global/index.tsx +++ b/src/components/Global/index.tsx @@ -10,6 +10,7 @@ import LogStatusButton from './LogStatusButton'; import SearchAndFilter from './SearchAndFilter'; import Difficulty from './Difficulty'; import Loading from './Loading'; +import AdminHeader from "./AdminHeader"; export { Button, @@ -23,5 +24,6 @@ export { LogStatusButton, SearchAndFilter, Difficulty, - Loading + Loading, + AdminHeader, }; diff --git a/src/pages/admin/index.tsx b/src/pages/admin/index.tsx index ca574c8..917dffd 100644 --- a/src/pages/admin/index.tsx +++ b/src/pages/admin/index.tsx @@ -5,7 +5,7 @@ import { useSession } from 'next-auth/react'; import { PuzzleGenerate } from '../../components/App'; import { getAllPuzzles, isAdmin } from '../../services'; import { GetServerSideProps } from 'next'; -import { Header } from '../../components/Global'; +import {AdminHeader, Header} from '../../components/Global'; const Admin = ({ puzzlesList }) => { const { data: session, status } = useSession(); @@ -34,6 +34,7 @@ const Admin = ({ puzzlesList }) => { return ( <>
+

ADMIN PAGE 🤓

{/** TODO: Create Header for admin page */}
From cef54a927223b89d0a8707522abf4398bb9c9adc Mon Sep 17 00:00:00 2001 From: yuqi88 Date: Tue, 29 Mar 2022 12:10:03 -0700 Subject: [PATCH 4/4] run prettify --- .../AdminHeader/AdminHeader.module.scss | 4 +--- src/components/Global/AdminHeader/index.tsx | 20 +++++++++---------- src/components/Global/index.tsx | 4 ++-- src/pages/admin/index.tsx | 4 ++-- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/components/Global/AdminHeader/AdminHeader.module.scss b/src/components/Global/AdminHeader/AdminHeader.module.scss index 1a9280d..0e65bac 100644 --- a/src/components/Global/AdminHeader/AdminHeader.module.scss +++ b/src/components/Global/AdminHeader/AdminHeader.module.scss @@ -8,6 +8,4 @@ padding: 0 1.5rem 3rem; font-size: 1.5rem; border-bottom: $grey-transparency 1px solid; - - -} \ No newline at end of file +} diff --git a/src/components/Global/AdminHeader/index.tsx b/src/components/Global/AdminHeader/index.tsx index 8c3ba2e..b8aa90d 100644 --- a/src/components/Global/AdminHeader/index.tsx +++ b/src/components/Global/AdminHeader/index.tsx @@ -1,15 +1,15 @@ import React from 'react'; -import styles from './AdminHeader.module.scss' +import styles from './AdminHeader.module.scss'; const AdminHeader = () => { - const currentPage = 'Admin Dashboard'; - return ( -
-
-

{currentPage}

-
-
- ); + const currentPage = 'Admin Dashboard'; + return ( +
+
+

{currentPage}

+
+
+ ); }; -export default AdminHeader; \ No newline at end of file +export default AdminHeader; diff --git a/src/components/Global/index.tsx b/src/components/Global/index.tsx index 06ca77e..aa84f10 100644 --- a/src/components/Global/index.tsx +++ b/src/components/Global/index.tsx @@ -10,7 +10,7 @@ import LogStatusButton from './LogStatusButton'; import SearchAndFilter from './SearchAndFilter'; import Difficulty from './Difficulty'; import Loading from './Loading'; -import AdminHeader from "./AdminHeader"; +import AdminHeader from './AdminHeader'; export { Button, @@ -25,5 +25,5 @@ export { SearchAndFilter, Difficulty, Loading, - AdminHeader, + AdminHeader }; diff --git a/src/pages/admin/index.tsx b/src/pages/admin/index.tsx index 917dffd..bc05f85 100644 --- a/src/pages/admin/index.tsx +++ b/src/pages/admin/index.tsx @@ -5,7 +5,7 @@ import { useSession } from 'next-auth/react'; import { PuzzleGenerate } from '../../components/App'; import { getAllPuzzles, isAdmin } from '../../services'; import { GetServerSideProps } from 'next'; -import {AdminHeader, Header} from '../../components/Global'; +import { AdminHeader, Header } from '../../components/Global'; const Admin = ({ puzzlesList }) => { const { data: session, status } = useSession(); @@ -34,7 +34,7 @@ const Admin = ({ puzzlesList }) => { return ( <>
- +

ADMIN PAGE 🤓

{/** TODO: Create Header for admin page */}