fix: complete TechLog migration evidence
This commit is contained in:
@@ -1,34 +1,11 @@
|
||||
import { useSourceCompatiblePublicNotFound } from "../public-not-found-layout.tsx";
|
||||
|
||||
export function PublicNotFoundPage() {
|
||||
useSourceCompatiblePublicNotFound();
|
||||
return (
|
||||
<>
|
||||
<style>{`
|
||||
html { background: white; color: black; }
|
||||
body {
|
||||
min-width: 0;
|
||||
margin: 8px;
|
||||
overflow: visible;
|
||||
background: transparent;
|
||||
color: black;
|
||||
font-family: "Times New Roman";
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
text-rendering: auto;
|
||||
word-break: normal;
|
||||
}
|
||||
pre.tech-log-plain-not-found {
|
||||
margin: 13px 0;
|
||||
color: black;
|
||||
font-family: monospace;
|
||||
font-size: 13px;
|
||||
line-height: normal;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
`}</style>
|
||||
<pre className="tech-log-plain-not-found">Not Found</pre>
|
||||
</>
|
||||
<main id="main-content" className="shell public-index-page">
|
||||
<header className="public-page-header">
|
||||
<p className="section-kicker">404</p>
|
||||
<h1>페이지를 찾을 수 없습니다.</h1>
|
||||
<p>요청한 공개 페이지가 없습니다.</p>
|
||||
</header>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import {
|
||||
createContext,
|
||||
useContext,
|
||||
useLayoutEffect,
|
||||
} from "react";
|
||||
|
||||
type SetNestedNotFound = (active: boolean) => void;
|
||||
|
||||
export const PublicNotFoundLayoutContext =
|
||||
createContext<SetNestedNotFound | null>(null);
|
||||
|
||||
export function useSourceCompatiblePublicNotFound(): void {
|
||||
const setNestedNotFound = useContext(PublicNotFoundLayoutContext);
|
||||
useLayoutEffect(() => {
|
||||
setNestedNotFound?.(true);
|
||||
return () => setNestedNotFound?.(false);
|
||||
}, [setNestedNotFound]);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
import { type ReactNode, useCallback, useState } from "react";
|
||||
import { type ReactNode } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { publicSiteConfig } from "../../contracts/public-site-config.ts";
|
||||
import { SiteHeader } from "./components/site-header.tsx";
|
||||
import { PublicNotFoundLayoutContext } from "./public-not-found-layout.tsx";
|
||||
|
||||
type PublicShellProps = {
|
||||
children: ReactNode;
|
||||
@@ -11,37 +10,29 @@ type PublicShellProps = {
|
||||
};
|
||||
|
||||
export function PublicShell({ children, currentPath }: PublicShellProps) {
|
||||
const [nestedNotFound, setNestedNotFound] = useState(false);
|
||||
const updateNestedNotFound = useCallback((active: boolean) => {
|
||||
setNestedNotFound(active);
|
||||
}, []);
|
||||
return (
|
||||
<PublicNotFoundLayoutContext.Provider value={updateNestedNotFound}>
|
||||
{nestedNotFound ? children : (
|
||||
<div className="site-frame">
|
||||
<a className="skip-link" href="#main-content">
|
||||
본문으로 건너뛰기
|
||||
</a>
|
||||
<SiteHeader currentPath={currentPath} />
|
||||
<div className="site-frame">
|
||||
<a className="skip-link" href="#main-content">
|
||||
본문으로 건너뛰기
|
||||
</a>
|
||||
<SiteHeader currentPath={currentPath} />
|
||||
|
||||
{children}
|
||||
{children}
|
||||
|
||||
<footer className="site-footer">
|
||||
<div className="shell footer-inner">
|
||||
<div>
|
||||
<p className="footer-name">{publicSiteConfig.operator}</p>
|
||||
<p>{publicSiteConfig.identityStatement}</p>
|
||||
</div>
|
||||
<div className="footer-links">
|
||||
<Link to={publicSiteConfig.contactPath}>
|
||||
{publicSiteConfig.contactLabel}
|
||||
</Link>
|
||||
<Link to={publicSiteConfig.latestRelease}>최신 Release</Link>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<footer className="site-footer">
|
||||
<div className="shell footer-inner">
|
||||
<div>
|
||||
<p className="footer-name">{publicSiteConfig.operator}</p>
|
||||
<p>{publicSiteConfig.identityStatement}</p>
|
||||
</div>
|
||||
<div className="footer-links">
|
||||
<Link to={publicSiteConfig.contactPath}>
|
||||
{publicSiteConfig.contactLabel}
|
||||
</Link>
|
||||
<Link to={publicSiteConfig.latestRelease}>최신 Release</Link>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</PublicNotFoundLayoutContext.Provider>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user