@@ -3,6 +3,10 @@ import React from "react";
33import { EvolutionContent } from "./_components/evolution-view" ;
44import { Navbar } from "@/components/core/navbar" ;
55import { Footer } from "@/components/core/footer" ;
6+ import { serverSession } from "@/lib/data" ;
7+ import { SELF_HOST } from "@/lib/utils" ;
8+ import Link from "next/link" ;
9+ import { Button } from "@/components/ui/button" ;
610
711async function fetchData ( ) {
812 try {
@@ -80,9 +84,45 @@ async function fetchData() {
8084
8185export default async function EvolutionPage ( ) {
8286 const data = await fetchData ( ) ;
87+
88+ if ( ! SELF_HOST ) {
89+ return (
90+ < div className = "h-screen" >
91+ < Navbar transparent = { false } />
92+ < div className = "flex items-center justify-center h-[80vh] p-8 text-center flex-col gap-4" >
93+ < p className = "text-xl" >
94+ We currently do not support this feature in online mode.
95+ < br />
96+ Please use the self-hosted version of KBNET to access this feature.
97+ < br />
98+ </ p >
99+ < Link href = "/pad" >
100+ < Button > Go to Pad</ Button >
101+ </ Link >
102+ </ div >
103+ < Footer />
104+ </ div >
105+ ) ;
106+ }
107+
83108 if ( ! data ) {
84- return < div > Error fetching evolution data</ div > ;
109+ return (
110+ < div className = "h-screen" >
111+ < Navbar transparent = { false } />
112+ < div className = "flex items-center justify-center h-[80vh] p-8 text-center flex-col gap-4" >
113+ < p className = "text-xl" >
114+ No evaluations found. Please create a map and wait for the
115+ evaluation to see results.
116+ </ p >
117+ < Link href = "/pad" >
118+ < Button > Go to Pad</ Button >
119+ </ Link >
120+ </ div >
121+ < Footer />
122+ </ div >
123+ ) ;
85124 }
125+
86126 return (
87127 < div >
88128 < Navbar transparent = { false } />
0 commit comments