diff --git a/src/config/project.js b/src/config/project.js index 9503c33..6bc1bb2 100644 --- a/src/config/project.js +++ b/src/config/project.js @@ -1,37 +1,37 @@ const Works = [ - { - name: "Large Language Model", - description: "Medical field chat application.", - href: "/project/llm", - background: "/1.png", - }, - { - name: "Data Visualization", - description: "Chart and 3D models.", - href: "/project/data-visualization", - background: "/1.png", - }, - { - name: "Hybrid Mobile App", - description: "QQ Music / We Sing Living Room.", - href: "/project/tme", - background: "/1.png", - }, + { + name: "Large Language Model", + description: "Medical field chat application.", + href: "/project/llm", + background: "/1.png", + }, + { + name: "Data Visualization", + description: "Chart and 3D models.", + href: "/project/data-visualization", + background: "/1.png", + }, + { + name: "Hybrid Mobile App", + description: "QQ Music / We Sing Living Room.", + href: "/project/tme", + background: "/1.png", + }, ]; const OpenSourceProjects = [ - { - name: "Comments", - description: "Add comments to your website.", - href: "/project/comments", - background: "/1.png", - }, - { - name: "daviddong.me", - description: "Personal website template.", - href: "/project/website", - background: "/1.png", - }, + { + name: "Comments", + description: "Add comments to your website.", + href: "/project/comments", + background: "/1.png", + }, + { + name: "daviddong.me", + description: "Personal website template.", + href: "/project/website", + background: "/1.png", + }, ]; -export { Works, OpenSourceProjects } +export { Works, OpenSourceProjects }; diff --git a/src/pages/project/@name/+Page.jsx b/src/pages/project/@name/+Page.jsx index 0fdc145..d5fd004 100644 --- a/src/pages/project/@name/+Page.jsx +++ b/src/pages/project/@name/+Page.jsx @@ -1,9 +1,9 @@ -import { usePageContext } from 'vike-react/usePageContext' +import { usePageContext } from "vike-react/usePageContext"; export default function Page() { - const pageContext = usePageContext() + const pageContext = usePageContext(); return ( -
-

Hello {pageContext.routeParams.name}

+
+

Hello {pageContext.routeParams.name}

); } diff --git a/src/pages/project/index/+Page.jsx b/src/pages/project/index/+Page.jsx index 763b9d6..977219a 100644 --- a/src/pages/project/index/+Page.jsx +++ b/src/pages/project/index/+Page.jsx @@ -1,29 +1,32 @@ -import React from 'react' +import { Button } from "@/components/ui/button"; import { OpenSourceProjects, Works } from "@/config/project"; -import { Button } from '@/components/ui/button'; -import { navigate } from 'vike/client/router'; +import React from "react"; +import { navigate } from "vike/client/router"; const ProjectLists = ({ title, items }) => ( -
-

{title}

- -
+
+

{title}

+ +
); - export default function Page() { - return ( -
- - -
- ) + return ( +
+ + +
+ ); } diff --git a/src/pages/project/index/+onBeforePrerenderStart.js b/src/pages/project/index/+onBeforePrerenderStart.js index aae9c85..c43d104 100644 --- a/src/pages/project/index/+onBeforePrerenderStart.js +++ b/src/pages/project/index/+onBeforePrerenderStart.js @@ -1,7 +1,7 @@ // Environment: Node.js import { OpenSourceProjects, Works } from "@/config/project"; -export { onBeforePrerenderStart } +export { onBeforePrerenderStart }; async function onBeforePrerenderStart() { - const lists = [...OpenSourceProjects, ...Works] - return lists.map(list => list.href) -} \ No newline at end of file + const lists = [...OpenSourceProjects, ...Works]; + return lists.map((list) => list.href); +}