From c245e92fde7fc651bb0d4a72a2ec15602fdcda4f Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sun, 24 Dec 2023 00:11:22 -0600 Subject: [PATCH] clean up some code --- components/FolderTree.js | 3 --- components/Layout.js | 20 ++++++++------------ components/MDContainer.js | 35 +++++++++++++++++------------------ 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/components/FolderTree.js b/components/FolderTree.js index ab926ef..ed6f383 100644 --- a/components/FolderTree.js +++ b/components/FolderTree.js @@ -39,11 +39,8 @@ export default function FolderTree(props) { const currentNode = props.flattenNodes.find(aNode => { return aNode.id === nodIds }) - // console.log(event) - // console.log(currentNode) if (currentNode != null && currentNode.routePath != null) { router.push(currentNode.routePath) - // router.reload() } }} sx={{ flexGrow: 1, maxWidth: 400, overflowY: 'auto' }} diff --git a/components/Layout.js b/components/Layout.js index 1dcd1e7..7e01a0b 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -1,15 +1,11 @@ -import Head from 'next/head' -// import BasicTree from 'lib/MyFolderTree' export const siteTitle = 'Digital Backroom - An Internet Archive' -import {Box} from '@mui/material' -export default function Layout({children}) { - - return ( -
-
- {children} -
-
- ) +export default function Layout({ children }) { + return ( +
+
+ {children} +
+
+ ) } diff --git a/components/MDContainer.js b/components/MDContainer.js index 544b5db..0e4ac66 100644 --- a/components/MDContainer.js +++ b/components/MDContainer.js @@ -1,24 +1,23 @@ -import React, {useState} from 'react'; +import React, { useState } from 'react'; import MDContent from "./MDContent"; -import {v4 as uuidv4} from 'uuid'; +import { v4 as uuidv4 } from 'uuid'; -function MDContainer({post, fileNames}) { - const [posts, setPosts] = useState([post]); +function MDContainer({ post, fileNames }) { + const [posts, setPosts] = useState([post]); - function handleClick(content) { - // console.log(content) - setPosts(prevPosts => { - return [...prevPosts, content] - }) - } + function handleClick(content) { + setPosts(prevPosts => { + return [...prevPosts, content] + }) + } - return ( -
- {posts.map(p => ( - - ))} -
- ); + return ( +
+ {posts.map(p => ( + + ))} +
+ ); } -export default MDContainer; \ No newline at end of file +export default MDContainer;