mirror of
https://github.com/20kaushik02/spotify-manager-web.git
synced 2026-01-25 16:14:06 +00:00
stricter tsconfig
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
|
||||
import AuthOnlyRoutes from "./AuthOnlyRoutes";
|
||||
import UnAuthOnlyRoutes from "./UnAuthOnlyRoutes";
|
||||
import AuthOnlyRoutes from "./AuthOnlyRoutes.tsx";
|
||||
import UnAuthOnlyRoutes from "./UnAuthOnlyRoutes.tsx";
|
||||
|
||||
import Landing from "../pages/Landing";
|
||||
import PageNotFound from "../pages/PageNotFound";
|
||||
import Graph from "../pages/Graph";
|
||||
import Login from "../pages/Login";
|
||||
import Logout from "../pages/Logout";
|
||||
import HowToUse from "../pages/HowToUse";
|
||||
import Landing from "../pages/Landing/index.tsx";
|
||||
import PageNotFound from "../pages/PageNotFound/index.tsx";
|
||||
import Graph from "../pages/Graph/index.tsx";
|
||||
import Login from "../pages/Login/index.tsx";
|
||||
import Logout from "../pages/Logout/index.tsx";
|
||||
import HowToUse from "../pages/HowToUse/index.tsx";
|
||||
|
||||
const AllRoutes = () => {
|
||||
const AllRoutes = ():React.ReactNode => {
|
||||
return (
|
||||
<Routes>
|
||||
{/* Routes that require user to be logged in */}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { useContext } from "react";
|
||||
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
||||
|
||||
import { AuthContext } from "../App";
|
||||
import { showWarnToastNotification } from "../components/ToastNotification";
|
||||
import { AuthContext } from "../App.tsx";
|
||||
import { showWarnToastNotification } from "../components/ToastNotification/index.tsx";
|
||||
|
||||
function AuthOnlyRoutes() {
|
||||
function AuthOnlyRoutes():React.ReactNode {
|
||||
let location = useLocation();
|
||||
const auth = useContext(AuthContext);
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { useContext } from "react";
|
||||
import { Navigate, Outlet, useLocation } from "react-router-dom";
|
||||
|
||||
import { AuthContext } from "../App";
|
||||
import { showWarnToastNotification } from "../components/ToastNotification";
|
||||
import { AuthContext } from "../App.tsx";
|
||||
import { showWarnToastNotification } from "../components/ToastNotification/index.tsx";
|
||||
|
||||
function UnAuthOnlyRoutes() {
|
||||
function UnAuthOnlyRoutes():React.ReactNode {
|
||||
let location = useLocation();
|
||||
const auth = useContext(AuthContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user