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/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"); } 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 = {