Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mrofisr committed Aug 20, 2024
1 parent 5721c46 commit 0c9cf43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import { HashRouter as Router, Route, Routes } from "react-router-dom";
import { Events } from "./pages/events";
import { Index } from "./pages";

Expand Down
4 changes: 2 additions & 2 deletions src/pages/events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { useParams } from "react-router-dom";

const events = [
{
short: "JuaraGCP2024SMG",
id: "JuaraGCP2024SMG",
title: "JuaraGCP Semarang 2024",
url: "https://bit.ly/JuaraGCPSmg",
},
];

export const Events = () => {
let { id } = useParams();
const event = events.find((e) => e.short === id);
const event = events.find((e) => e.id === id);
if (!event) {
console.error("Event not found");
return null;
Expand Down

0 comments on commit 0c9cf43

Please sign in to comment.