Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/global-error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use client";

export default function GlobalError({
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<html lang="en">
<body>
<div style={{ padding: "2rem", textAlign: "center" }}>
<h2>Something went wrong</h2>
<button onClick={() => reset()} style={{ marginTop: "1rem" }}>
Try again
</button>
</div>
</body>
</html>
);
}
12 changes: 8 additions & 4 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type React from "react";
import type { Metadata } from "next";
import "./globals.css";
import { Toaster } from "@/components/ui/toaster";
import { LazyToaster } from "@/components/LazyToaster";
import { SimpleAnalytics } from "@/components/SimpleAnalytics";
import SWRProvider from "@/components/SWRProvider";
import { Sidebar } from "@/components/HomePageClient";
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function RootLayout({
<main className="container mx-auto bg-background site-main-content">
<SWRProvider>
<div className="min-h-screen">
<div className="container px-4 py-6">
<div className="px-4 py-6">
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
<Sidebar pageTitle="Outcomes Tracker" />
<div className="col-span-3">{children}</div>
Expand All @@ -81,13 +81,17 @@ export default function RootLayout({
<div className="container mx-auto">
<div className="mb-8">
<p className="text-white">
🏗️🇨🇦 A <a href="/" className="underline decoration-white">Build Canada</a> project.
🏗️🇨🇦 A{" "}
<a href="/" className="underline decoration-white">
Build Canada
</a>{" "}
project.
</p>
</div>
</div>
</footer>
</div>
<Toaster />
<LazyToaster />
<SimpleAnalytics />
{/* <Script
src="https://frenglish.ai/frenglish.bundle.js"
Expand Down
15 changes: 15 additions & 0 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Link from "next/link";

export default function NotFound() {
return (
<div className="flex flex-col items-center justify-center py-20">
<h2 className="text-2xl font-bold mb-2">Page Not Found</h2>
<p className="text-gray-500 mb-4">
The page you are looking for does not exist.
</p>
<Link href="/v2" className="text-[#8b2332] hover:underline">
Go to Overview
</Link>
</div>
);
}
Loading