diff --git a/app/(private)/AgregarTiempo/page.tsx b/app/(private)/AgregarTiempo/page.tsx
index c7a081d..357d2ba 100644
--- a/app/(private)/AgregarTiempo/page.tsx
+++ b/app/(private)/AgregarTiempo/page.tsx
@@ -5,15 +5,18 @@ import { GetStudent } from "@/app/lib/getStudent";
import "./addTime.css";
-export default async function Page({ searchParams }: any) {
+export default async function Page(props:{
+ searchParams?: Promise<{
+ numAcount:string;
+ }>
+}) {
+
+ const params =await props.searchParams;
+ const numAcount = params?.numAcount ? parseInt(params.numAcount) : null;
- const numAccount = searchParams?.numAccount
- ? Number(searchParams.numAccount)
- : null;
-
let student: any = null;
- if (numAccount) {
- student = await GetStudent(numAccount);
+ if (numAcount) {
+ student = await GetStudent(numAcount);
}
return (
@@ -27,7 +30,7 @@ export default async function Page({ searchParams }: any) {
Cargando...
; + if (loading) returnCargando...
; - return !authenticated ? <>{children}> : null; + return !authenticated ? <>{children}> : null; }; -//IO \ No newline at end of file +//IO diff --git a/app/Routes/PrivateRoute.tsx b/app/Routes/PrivateRoute.tsx index a3c679a..8342c1c 100644 --- a/app/Routes/PrivateRoute.tsx +++ b/app/Routes/PrivateRoute.tsx @@ -18,4 +18,4 @@ export const PrivateRoute = ({ children }: { children: React.ReactNode }) => { return authenticated ? <>{children}> : null; }; -//IO \ No newline at end of file +//IO diff --git a/app/layout.tsx b/app/layout.tsx index e207c3f..0981bf2 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -25,7 +25,7 @@ export default function RootLayout({ }>) { return ( - +