diff --git a/components/Blog/DiaryPageSelector.tsx b/components/Blog/DiaryPageSelector.tsx index 32e6d81..0d1785f 100644 --- a/components/Blog/DiaryPageSelector.tsx +++ b/components/Blog/DiaryPageSelector.tsx @@ -6,18 +6,22 @@ import { useEffect } from "react"; import styles from "../../styles/Blog/DiaryPageSelector.module.scss"; -interface IContentNavBar { +interface IContent { pages: string[]; name: string; title: string; pageSelected: number } -interface IContentNav extends IContentNavBar { +interface IContentNavBar extends IContent { + mobile?: boolean; +} + +interface IContentNav extends IContent { bottom?: boolean; } -const PageSelectorBar: NextPage = ({ pages, name, title, pageSelected }) => { +const PageSelectorBar: NextPage = ({ pages, name, title, pageSelected, mobile }) => { const router = useRouter(); // When we are on the main page no previous page exists, otherwise we need to check if the previous page is the main page @@ -46,8 +50,10 @@ const PageSelectorBar: NextPage = ({ pages, name, title, pageSel ); + const classNames = mobile ? `${styles.barNav} ${styles.mobile}` : styles.barNav; + return ( -
+
{prev}   |   {select} @@ -62,11 +68,15 @@ const PageSelector: NextPage = (content) => { if (content.bottom) return ; return ( -
-

{content.title}

-
    - {content.pages.map((e, idx) =>
  • {e}
  • )} -
+
+ + +
+

{content.title}

+
    + {content.pages.map((e, idx) =>
  • {e}
  • )} +
+
); };