Skip to content

Commit

Permalink
Add retry button to ScrapeError
Browse files Browse the repository at this point in the history
  • Loading branch information
itzCozi committed Feb 29, 2024
1 parent 9cce979 commit efe3639
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
"notFound": {
"badge": "Not found",
"detailsButton": "Show details",
"reloadButton": "Try again",
"homeButton": "Go home",
"text": "We can not find the media you are looking for or no one provides it... <bold>Did you enable the extension for this site?</bold>",
"title": "We couldn't find that"
Expand Down
18 changes: 13 additions & 5 deletions src/pages/parts/player/ScrapeErrorPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,30 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
</Paragraph>
<div className="flex gap-3">
<Button
href="/"
onClick={() => window.location.reload()}
theme="secondary"
padding="md:px-12 p-2.5"
className="mt-6"
>
{t("player.scraping.notFound.homeButton")}
{t("player.scraping.notFound.reloadButton")}
</Button>
<Button
onClick={() => modal.show()}
theme="purple"
href="/"
theme="secondary"
padding="md:px-12 p-2.5"
className="mt-6"
>
{t("player.scraping.notFound.detailsButton")}
{t("player.scraping.notFound.homeButton")}
</Button>
</div>
<Button
onClick={() => modal.show()}
theme="purple"
padding="md:px-12 p-2.5"
className="mt-6"
>
{t("player.scraping.notFound.detailsButton")}
</Button>
</ErrorContainer>
{error ? (
<ErrorCardInModal
Expand Down

0 comments on commit efe3639

Please sign in to comment.