Feature: Eigene 404-Seite im Landingpage-Stil
app/not-found.tsx erzeugt landingpage/404.html (Terminal-Look mit angefragtem Pfad). Die Deploy-Skripte kopieren sie zusätzlich in den Webroot, damit sie auch außerhalb von /landingpage/ greift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
99c6c9516c
commit
ea2bcfbd27
1 changed files with 153 additions and 0 deletions
19
components/requested-path.tsx
Normal file
19
components/requested-path.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
'use client'
|
||||
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
// Shows the requested URL path; falls back to a placeholder without JS
|
||||
export function RequestedPath() {
|
||||
const [path, setPath] = useState('/gesuchte-seite')
|
||||
|
||||
useEffect(() => {
|
||||
const raw = window.location.pathname
|
||||
try {
|
||||
setPath(decodeURI(raw))
|
||||
} catch {
|
||||
setPath(raw) // malformed percent-encoding
|
||||
}
|
||||
}, [])
|
||||
|
||||
return <span className="break-all">{path}</span>
|
||||
}
|
||||
Loading…
Reference in a new issue