fix: change browserRouter to hashRouter

This commit is contained in:
Artemy 2023-08-09 18:03:05 +03:00
parent d5c9887acb
commit fa097e4bdd
2 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@ import "./App.css";
import { NextUIProvider } from "@nextui-org/react";
import { PipedAPI } from "piped-api";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { HashRouter, Navigate, Route, Routes } from "react-router-dom";
import Trending from "./pages/trending";
import { NavbarComponent } from "./components/navbar";
@ -16,13 +16,13 @@ function App() {
return (
<NextUIProvider>
<BrowserRouter>
<HashRouter>
<NavbarComponent />
<Routes>
<Route path="/" element={<Navigate to="/trending" />} />
<Route path="/trending" element={<Trending />} />
</Routes>
</BrowserRouter>
</HashRouter>
</NextUIProvider>
);
}

View file

@ -19,10 +19,10 @@ export function VideoComponent({ video }: VideoComponentProps) {
<CardBody className="flex gap-3 flex-row">
<Avatar className="flex-none" src={video.uploaderAvatar} />
<div className="flex gap-3 flex-col">
<Link color="foreground" href={video.url}>
<Link color="foreground" href={`#${video.url}`}>
{video.title}
</Link>
<Link color="foreground" href={video.uploaderUrl}>
<Link color="foreground" href={`#${video.uploaderUrl}`}>
<div className="flex flex-row items-center">
<p className="flex-none text-md">{video.uploaderName}</p>
{video.uploaderVerified && (