carnet page
This commit is contained in:
parent
9cabc67ca0
commit
ed9d313735
1
.env
1
.env
@ -28,6 +28,7 @@ NEXT_PUBLIC_IFRAME_GITE_URL=https://gite.slm-lab.net/user/oauth2/cube
|
||||
NEXT_PUBLIC_IFRAME_CALCULATION_URL=https://calcul.slm-lab.net
|
||||
NEXT_PUBLIC_IFRAME_MEDIATIONS_URL=https://connect.slm-lab.net/realms/cercle/protocol/openid-connect/auth?client_id=mediations.slm-lab.net&redirect_uri=https%3A%2F%2Fmediations.slm-lab.net%2F%3Fopenid_mode%3Dtrue&scope=openid%20profile%20email&response_type=code
|
||||
NEXT_PUBLIC_IFRAME_SHOWCASE_URL=https://page.slm-lab.net
|
||||
NEXT_PUBLIC_IFRAME_CARNET_URL=https://journal.governance-labs.com/
|
||||
|
||||
# Navigation bar iframes
|
||||
NEXT_PUBLIC_IFRAME_CONFERENCE_URL=https://vision.slm-lab.net
|
||||
|
||||
37
app/carnet/page.tsx
Normal file
37
app/carnet/page.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default function CarnetPage() {
|
||||
const { data: session, status } = useSession();
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
redirect("/signin");
|
||||
}
|
||||
if (status !== "loading") {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}, [status]);
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="flex h-screen items-center justify-center">
|
||||
<div className="h-32 w-32 animate-spin rounded-full border-t-2 border-b-2 border-gray-900"></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="h-screen w-full">
|
||||
<iframe
|
||||
src={process.env.NEXT_PUBLIC_IFRAME_CARNET_URL}
|
||||
className="h-full w-full border-0"
|
||||
title="Carnet"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -20,6 +20,7 @@ import {
|
||||
Kanban,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
BookOpen,
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
@ -114,6 +115,12 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
|
||||
// Base menu items (available for everyone)
|
||||
const baseMenuItems: MenuItem[] = [
|
||||
{
|
||||
title: "Carnet",
|
||||
icon: BookOpen,
|
||||
href: "/carnet",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CARNET_URL,
|
||||
},
|
||||
{
|
||||
title: "Agenda",
|
||||
icon: Calendar,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user