update imports, classname and remove graphdata from note index

This commit is contained in:
Triston Armstrong 2023-12-25 19:27:15 -06:00
parent 4292c53fde
commit 67f7658907

View File

@ -1,4 +1,4 @@
import Layout from "../components/Layout";
import Layout from "../../components/Layout";
import {
getSinglePost,
getDirectoryData,
@ -6,16 +6,16 @@ import {
getFlattenArray,
getLocalGraphData,
constructGraphData
} from "../lib/utils";
import FolderTree from "../components/FolderTree";
import MDContent from "../components/MDContent";
} from "../../lib/utils";
import FolderTree from "../../components/FolderTree";
import MDContent from "../../components/MDContent";
// This trick is to dynamically load component that interact with window object (browser only)
export default function Home({ content, tree, flattenNodes, backLinks }) {
return (
<Layout>
<div className='container'>
<div className='notes-container'>
<nav className="nav-bar">
<FolderTree tree={tree} flattenNodes={flattenNodes} />
</nav>
@ -35,13 +35,11 @@ export function getStaticProps() {
const internalLinks = listOfEdges.map(anEdge => nodes.find(aNode => aNode.slug === anEdge.source)).filter(element => element !== undefined)
const backLinks = [...new Set(internalLinks)]
const graphData = getLocalGraphData("index");
return {
props: {
content: contentData.data,
tree: tree,
flattenNodes: flattenNodes,
graphData: graphData,
backLinks: backLinks
},
};