pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update NotFoundPart.tsx

Pas 71852409 bf8e2504

+26
+26
src/pages/parts/errors/NotFoundPart.tsx
··· 1 1 import { Helmet } from "react-helmet-async"; 2 2 import { useTranslation } from "react-i18next"; 3 3 4 + import { isExtensionActiveCached } from "@/backend/extension/messaging"; 4 5 import { Button } from "@/components/buttons/Button"; 5 6 import { Icons } from "@/components/Icon"; 6 7 import { IconPill } from "@/components/layout/IconPill"; ··· 8 9 import { Title } from "@/components/text/Title"; 9 10 import { Paragraph } from "@/components/utils/Text"; 10 11 import { ErrorContainer, ErrorLayout } from "@/pages/layouts/ErrorLayout"; 12 + import { conf } from "@/setup/config"; 13 + import { useOnboardingStore } from "@/stores/onboarding"; 14 + import { usePreferencesStore } from "@/stores/preferences"; 11 15 12 16 export function NotFoundPart() { 13 17 const { t } = useTranslation(); 18 + const setOnboardingCompleted = useOnboardingStore((s) => s.setCompleted); 19 + const febboxKey = usePreferencesStore((s) => s.febboxKey); 20 + 21 + function handleOnboarding() { 22 + setOnboardingCompleted(false); 23 + window.location.reload(); 24 + } 14 25 15 26 return ( 16 27 <div className="relative flex flex-1 flex-col"> ··· 42 53 {t("notFound.reloadButton")} 43 54 </Button> 44 55 </div> 56 + {(!isExtensionActiveCached() || !febboxKey) && 57 + conf().HAS_ONBOARDING ? ( 58 + <div className="flex flex-col max-w-md gap-3 items-center py-3"> 59 + <Paragraph> 60 + {t("player.scraping.notFound.onboarding")} 61 + </Paragraph> 62 + <Button 63 + onClick={() => handleOnboarding()} 64 + theme="purple" 65 + className="w-fit" 66 + > 67 + {t("player.scraping.notFound.onboardingButton")} 68 + </Button> 69 + </div> 70 + ) : null} 45 71 </ErrorContainer> 46 72 </ErrorLayout> 47 73 </div>