mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
chore(deps): upgrade to react-router v6
This commit is contained in:
parent
4996615f2b
commit
00f9f91191
10 changed files with 60 additions and 228 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useMemo, useState } from "react";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import { Artist } from "../api/entities/artist";
|
||||
import { Genre } from "../api/entities/genre";
|
||||
import { TimeOptions } from "../api/entities/time-options";
|
||||
|
|
@ -33,7 +33,7 @@ export const ReportTopGenres: React.FC = () => {
|
|||
const reportHasItems = !isLoading && topGenres.length !== 0;
|
||||
|
||||
if (!user) {
|
||||
return <Redirect to="/" />;
|
||||
return <Navigate to="/" replace />;
|
||||
}
|
||||
|
||||
const maxCount = getMaxCount(topGenres);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue