Files
outline/app/scenes/Errors/Error403.tsx
Tom Moor 1da18c3101 chore: Refactor useActionContext to use React context (#10140)
* chore: Refactor useActionContext to use React context

* Self review

* PR feedback
2025-09-09 23:22:46 +00:00

38 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import Flex from "@shared/components/Flex";
import Button from "~/components/Button";
import Empty from "~/components/Empty";
import Heading from "~/components/Heading";
import Scene from "~/components/Scene";
import { navigateToHome } from "~/actions/definitions/navigation";
const Error403 = () => {
const { t } = useTranslation();
const history = useHistory();
return (
<Scene title={t("No access to this doc")}>
<Heading>{t("No access to this doc")}</Heading>
<Flex gap={20} style={{ maxWidth: 500 }} column>
<Empty size="large">
{t(
"It doesnt look like you have permission to access this document."
)}{" "}
{t("Please request access from the document owner.")}
</Empty>
<Flex gap={8}>
<Button action={navigateToHome} hideIcon>
{t("Home")}
</Button>
<Button onClick={history.goBack} neutral>
{t("Go back")}
</Button>
</Flex>
</Flex>
</Scene>
);
};
export default Error403;