diff --git a/src/components/ArtifactCard.tsx b/src/components/ArtifactCard.tsx index 9dfca4d..12adc96 100644 --- a/src/components/ArtifactCard.tsx +++ b/src/components/ArtifactCard.tsx @@ -1,7 +1,7 @@ -import "../styles/ArtifactCard.sass"; -import { ArtifactData } from "../scripts/interfaces"; -import { NavLink } from "react-router-dom"; -import { ReactElement } from "react"; +import '../styles/ArtifactCard.sass' +import { ArtifactData } from '../scripts/interfaces' +import { NavLink } from 'react-router-dom' +import { ReactElement } from 'react' /** * ArtifactPage card component. Displays high-level information about an artifact (title, subtitle, 3D graphic). @@ -18,7 +18,7 @@ export default function ArtifactCard(props: { // Render return ( /* skipcq: JS-0394 */ - +

{title}

{subtitle}

diff --git a/src/main.tsx b/src/main.tsx index 7c8f78d..6e80cb9 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,28 +1,28 @@ -import "./styles/index.sass"; -import { ArtifactData } from "./scripts/interfaces"; -import ArtifactPage from "./routes/ArtifactPage"; -import ErrorPage from "./routes/ErrorPage"; -import ParseData from "./scripts/parse-data"; -import React from "react"; -import ReactDOM from "react-dom/client"; -import Root from "./routes/Root"; +import './styles/index.sass' +import { ArtifactData } from './scripts/interfaces' +import ArtifactPage from './routes/ArtifactPage' +import ErrorPage from './routes/ErrorPage' +import ParseData from './scripts/parse-data' +import React from 'react' +import ReactDOM from 'react-dom/client' +import Root from './routes/Root' // eslint-disable-next-line sort-imports -import { createBrowserRouter, RouterProvider } from "react-router-dom"; -import Graphics from "./scripts/graphics"; +import { createHashRouter, RouterProvider } from 'react-router-dom' +import Graphics from './scripts/graphics' // Parse data and return as an array of ArtifactPage objects const artifacts: ArtifactData[] = ParseData(); // Create router -const router = createBrowserRouter([ +const router = createHashRouter([ { - path: "/honors-portfolio/", + path: "/", element: , errorElement: , loader: () => artifacts, }, { - path: "/honors-portfolio/:id", + path: ":id", element: , errorElement: , loader: ({ params }) => { diff --git a/src/routes/ArtifactPage.tsx b/src/routes/ArtifactPage.tsx index 1d32439..791839b 100644 --- a/src/routes/ArtifactPage.tsx +++ b/src/routes/ArtifactPage.tsx @@ -1,9 +1,9 @@ -import "../styles/ArtifactPage.sass"; -import { ArtifactData, EmbedData, LinkData } from "../scripts/interfaces"; -import { Fragment, ReactElement } from "react"; -import { NavLink, useLoaderData } from "react-router-dom"; -import Gallery from "../components/Gallery"; -import RichLink from "../components/RichLink"; +import '../styles/ArtifactPage.sass' +import { ArtifactData, EmbedData, LinkData } from '../scripts/interfaces' +import { Fragment, ReactElement } from 'react' +import { NavLink, useLoaderData } from 'react-router-dom' +import Gallery from '../components/Gallery' +import RichLink from '../components/RichLink' /** * Artifact header, displays artifact title, subtitle, date, and links @@ -87,7 +87,7 @@ export default function ArtifactPage(): ReactElement { {/* skipcq: JS-0394 */}