Skip to content

Commit

Permalink
Revert "Hide back on about page"
Browse files Browse the repository at this point in the history
This reverts commit b6eac76.
  • Loading branch information
mlpierce22 committed Dec 4, 2023
1 parent 84df6ce commit 1685b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 1 addition & 9 deletions src/app/about/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
import Layout from '@/app/prose-layout'
import React from 'react'

export default function AboutLayout({ children }: { children: React.ReactNode }) {
return (
<Layout hideBack={true}>
{children}
</Layout>
)
}
export default Layout
6 changes: 2 additions & 4 deletions src/app/prose-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { Box, Button, VStack } from "@chakra-ui/react";
import { useRouter } from "next/navigation";
import { IoMdArrowBack } from "react-icons/io";

export default function MdxLayout({ children, hideBack }: { children: React.ReactNode, hideBack?: boolean }) {
export default function MdxLayout({ children }: { children: React.ReactNode }) {
const router = useRouter();
return (
<VStack w={"100%"} h={"100%"}>
{!!!hideBack && (
<Button leftIcon={<IoMdArrowBack />} onClick={() => router.back()} alignSelf={"start"} mt={10}>Back</Button>
)}
<Button leftIcon={<IoMdArrowBack />} onClick={() => router.back()} alignSelf={"start"} mt={10}>Back</Button>
<Box as="div" p={10} className="prose md:prose-xl prose-stone dark:prose-invert overflow-scroll">
{children}
</Box>
Expand Down

0 comments on commit 1685b05

Please sign in to comment.