This commit is contained in:
Cooper Ransom 2024-03-27 17:27:25 -04:00
commit 001183ca81

View File

@ -51,10 +51,6 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
useEffect(() => { useEffect(() => {
getExtensionState().then((state: ExtensionStatus) => { getExtensionState().then((state: ExtensionStatus) => {
setExtensionState(state); setExtensionState(state);
if (state === "disallowed") {
setTitle(t("player.scraping.extensionFailure.disabledTitle"));
setIcon(Icons.LOCK);
}
}); });
}, [t]); }, [t]);
@ -62,8 +58,8 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
return ( return (
<ErrorLayout> <ErrorLayout>
<ErrorContainer> <ErrorContainer>
<IconPill icon={icon}>{t("player.scraping.notFound.badge")}</IconPill> <IconPill icon={Icons.LOCK}>{t("player.scraping.notFound.badge")}</IconPill>
<Title>{title}</Title> <Title>t("player.scraping.extensionFailure.disabledTitle")</Title>
<Paragraph> <Paragraph>
<Trans <Trans
i18nKey="player.scraping.extensionFailure.text" i18nKey="player.scraping.extensionFailure.text"
@ -98,13 +94,6 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
</Button> </Button>
</div> </div>
</ErrorContainer> </ErrorContainer>
{error ? (
<ErrorCardInModal
id={modal.id}
onClose={() => modal.hide()}
error={error}
/>
) : null}
</ErrorLayout> </ErrorLayout>
); );
} }
@ -112,16 +101,9 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
return ( return (
<ErrorLayout> <ErrorLayout>
<ErrorContainer> <ErrorContainer>
<IconPill icon={icon}>{t("player.scraping.notFound.badge")}</IconPill> <IconPill icon={Icons.WAND}>{t("player.scraping.notFound.badge")}</IconPill>
<Title>{title}</Title> <Title>{t("player.scraping.notFound.title")}</Title>
<Paragraph> <Paragraph>{t("player.scraping.notFound.text")}</Paragraph>
<Trans
i18nKey="player.scraping.notFound.text"
components={{
bold: <span className="font-bold" style={{ color: "#cfcfcf" }} />,
}}
/>
</Paragraph>
<div className="flex gap-3"> <div className="flex gap-3">
<Button <Button
href="/" href="/"
@ -132,12 +114,7 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
{t("player.scraping.notFound.homeButton")} {t("player.scraping.notFound.homeButton")}
</Button> </Button>
<Button <Button
onClick={() => { onClick={() => modal.show()}
sendPage({
page: "PermissionGrant",
redirectUrl: window.location.href,
});
}}
theme="purple" theme="purple"
padding="md:px-12 p-2.5" padding="md:px-12 p-2.5"
className="mt-6" className="mt-6"