edited some texts

This commit was merged in pull request #2.
This commit is contained in:
Ebube
2023-10-18 00:40:45 +01:00
parent c2dbf2d6a3
commit b5f0423fdb
3 changed files with 5 additions and 5 deletions
+4 -3
View File
@@ -1,10 +1,11 @@
"use client"
"use client";
import { useEffect } from "react";
import { useRouter } from "next/router";
/**
* This is used to protect routes in a web application.
* This function is used to protect routes in a web application.
* It checks if the user is authenticated and redirects them to the sign-in page if they are not.
*/
const AuthRoute = ({ children }) => {
const router = useRouter();
@@ -14,7 +15,7 @@ const AuthRoute = ({ children }) => {
if (!isAuthenticated) {
router.push("/authentication/sign-in/");
}
}
}, [router]);
return <>{children}</>;