You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { useEnabledStatus } from "@/modules/redux/hooks";
|
|
|
|
import { FunctionComponent } from "react";
|
|
|
|
import { Navigate } from "react-router-dom";
|
|
|
|
|
|
|
|
const Redirector: FunctionComponent = () => {
|
|
|
|
const { sonarr, radarr } = useEnabledStatus();
|
|
|
|
|
|
|
|
let path = "/settings/general";
|
|
|
|
if (sonarr) {
|
|
|
|
path = "/series";
|
|
|
|
} else if (radarr) {
|
|
|
|
path = "/movies";
|
|
|
|
}
|
|
|
|
|
|
|
|
return <Navigate to={path}></Navigate>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Redirector;
|