Skip to content

Commit

Permalink
chore: thesis stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
wodeni committed Sep 13, 2024
1 parent 49b8598 commit e44a441
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
Binary file added assets/nimo-defense-poster.pdf
Binary file not shown.
Binary file added assets/nimo-dissertation.pdf
Binary file not shown.
12 changes: 11 additions & 1 deletion src/News.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ const news: News[] = [
{
time: new Date("2024-09-26"),
msg: (
<>Finished the dissertation document and will defend in a few weeks!</>
<>
Finished the <A href="/thesis">dissertation</A> document and will{" "}
<A
href={
new URL("/assets/nimo-defense-poster.pdf", import.meta.url).href
}
>
defend
</A>{" "}
in a few weeks!
</>
),
},
{
Expand Down
22 changes: 19 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
import React from "react";
import React, { useEffect } from "react";
import ReactDOM from "react-dom/client";
import App from "./App.js";
import "./index.css";
import { BrowserRouter } from "react-router-dom";
import { BrowserRouter, Link } from "react-router-dom";
import { Routes, Route, Navigate } from "react-router-dom";

function RedirectToPDF() {
useEffect(() => {
// Redirect to the PDF file
window.location.href = new URL(
"/assets/nimo-dissertation.pdf",
import.meta.url
).href;
}, []);

return null; // Render nothing, just trigger the redirect
}

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<BrowserRouter>
<App />
<Routes>
<Route path="/" element={<App />} />
<Route path="/thesis" element={<RedirectToPDF />} />
</Routes>
</BrowserRouter>
</React.StrictMode>
);

0 comments on commit e44a441

Please sign in to comment.