2022-03-16 06:26:15 +00:00
|
|
|
import { useEnabledStatus } from "@/modules/redux/hooks";
|
|
|
|
import { FunctionComponent } from "react";
|
|
|
|
import { Navigate } from "react-router-dom";
|
|
|
|
|
|
|
|
const Redirector: FunctionComponent = () => {
|
|
|
|
const { sonarr, radarr } = useEnabledStatus();
|
|
|
|
|
2022-03-20 04:09:00 +00:00
|
|
|
let path = "/settings/general";
|
2022-03-16 06:26:15 +00:00
|
|
|
if (sonarr) {
|
|
|
|
path = "/series";
|
|
|
|
} else if (radarr) {
|
|
|
|
path = "/movies";
|
|
|
|
}
|
|
|
|
|
|
|
|
return <Navigate to={path}></Navigate>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Redirector;
|