From b984bd947b0d5232d8ab97e270d1685c87545db4 Mon Sep 17 00:00:00 2001 From: v0 Date: Sat, 4 Apr 2026 14:12:02 +0000 Subject: [PATCH 1/2] feat: retire EventLens app with retirement notice Remove login page and update middleware for access shutdown. Co-authored-by: Sonia Cook-Broen <6611661+binaryLady@users.noreply.github.com> --- src/app/login/page.tsx | 112 +++++++++++++---------------------------- src/middleware.ts | 28 +++-------- 2 files changed, 44 insertions(+), 96 deletions(-) diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index a05e05b..174ef8e 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,102 +1,62 @@ // @TheTechMargin 2026 -"use client"; - -import { useState } from "react"; -import { useRouter } from "next/navigation"; - -export default function LoginPage() { - const router = useRouter(); - const [password, setPassword] = useState(""); - const [error, setError] = useState(""); - const [loading, setLoading] = useState(false); - - const handleSubmit = async (e: React.FormEvent) => { - e.preventDefault(); - setError(""); - setLoading(true); - - try { - const res = await fetch("/api/auth/login", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ password }), - }); - - const data = await res.json(); - - if (!res.ok) { - setError(data.error || "Authentication failed"); - setLoading(false); - return; - } - - router.push("/"); - } catch { - setError("Network error — please try again"); - setLoading(false); - } - }; +import Link from "next/link"; +export default function RetiredPage() { return ( -
-
+
+
- eventlens://auth + eventlens://notice

- ACCESS REQUIRED + EVENT CONCLUDED

-

- Enter your access credential to continue +

+ The HardMode EventLens has concluded. Reach out to me for access to photos or with questions about the app.

-
+
- - setPassword(e.target.value)} - placeholder="••••••••" - className="w-full bg-[var(--el-bg)] border border-[var(--el-primary-d9)] px-3 py-2 text-xs text-[var(--el-primary)] placeholder-[var(--el-accent)] focus:border-[var(--el-primary)] focus:outline-none transition-colors" - disabled={loading} - autoFocus - /> + www.thetechmargin.com +
+
+ + Email + + + sonia@thetechmargin.com + +
+
- {error && ( -
- ✗ {error} -
- )} - - -
- +
+ + Thank you for participating + +
diff --git a/src/middleware.ts b/src/middleware.ts index c28c7b7..3e0ec31 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,31 +1,19 @@ // @TheTechMargin 2026 +// App retired - redirect all traffic to the retired notice page import { NextRequest, NextResponse } from "next/server"; export function middleware(request: NextRequest) { const { pathname } = request.nextUrl; - const publicPaths = ["/login", "/api/auth/login"]; - const isPublicPath = publicPaths.some((path) => pathname.startsWith(path)); - - const authCookie = request.cookies.get("auth"); - const isAuthenticated = authCookie?.value === "true"; - - if (!isAuthenticated && !isPublicPath) { - return NextResponse.redirect(new URL("/login", request.url)); - } - - if (isAuthenticated && pathname === "/login") { - return NextResponse.redirect(new URL("/", request.url)); + // Allow access to the login page (now retired notice) and static assets + if (pathname === "/login" || pathname.startsWith("/_next") || pathname.startsWith("/favicon")) { + const response = NextResponse.next(); + response.headers.set("Content-Security-Policy", "frame-ancestors 'self'"); + return response; } - const response = NextResponse.next(); - - response.headers.set( - "Content-Security-Policy", - "frame-ancestors 'self'" - ); - - return response; + // Redirect all other routes to the retired notice + return NextResponse.redirect(new URL("/login", request.url)); } export const config = { From a919fc97c9b84377ad477a8af5f57874c27d0213 Mon Sep 17 00:00:00 2001 From: v0 Date: Sat, 4 Apr 2026 14:12:19 +0000 Subject: [PATCH 2/2] feat: redirect main page to retirement notice on login Update entry point to redirect to retirement notice while preserving existing code. Co-authored-by: Sonia Cook-Broen <6611661+binaryLady@users.noreply.github.com> --- src/app/page.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 29b8170..203e763 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,17 +1,6 @@ // @TheTechMargin 2026 -"use client"; - -import { Suspense } from "react"; -import ErrorBoundary from "@/components/ErrorBoundary"; -import TerminalLoader from "@/components/gallery/TerminalLoader"; -import PhotoGallery from "@/components/gallery/PhotoGallery"; +import { redirect } from "next/navigation"; export default function Home() { - return ( - - }> - - - - ); + redirect("/login"); }