mirror of
https://github.com/khairul169/code-share.git
synced 2025-04-29 00:59:37 +07:00
21 lines
394 B
TypeScript
21 lines
394 B
TypeScript
import { usePageContext } from "~/renderer/context";
|
|
|
|
const Page = () => {
|
|
const pageContext = usePageContext();
|
|
let { abortReason } = pageContext;
|
|
|
|
if (!abortReason) {
|
|
abortReason = pageContext.is404
|
|
? "Page not found."
|
|
: "Something went wrong.";
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<p style={{ fontSize: "1.3em" }}>{abortReason}</p>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Page;
|