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.

Convet /route#route to the sexier useNavigation

+18 -13
+3 -2
src/components/layout/Navigation.tsx
··· 1 1 import classNames from "classnames"; 2 - import { Link } from "react-router-dom"; 2 + import { Link, useNavigate } from "react-router-dom"; 3 3 4 4 import { NoUserAvatar, UserAvatar } from "@/components/Avatar"; 5 5 import { IconPatch } from "@/components/buttons/IconPatch"; ··· 21 21 22 22 export function Navigation(props: NavigationProps) { 23 23 const bannerHeight = useBannerSize(); 24 + const navigate = useNavigate(); 24 25 const { loggedIn } = useAuth(); 25 26 26 27 return ( ··· 103 104 <IconPatch icon={Icons.GITHUB} clickable downsized /> 104 105 </a> 105 106 <a 106 - href="/flix#flix" 107 + onClick={() => navigate("/flix")} 107 108 rel="noreferrer" 108 109 className="text-xl text-white tabbable rounded-full" 109 110 >
+15 -11
src/pages/About.tsx
··· 1 1 import classNames from "classnames"; 2 2 import { useTranslation } from "react-i18next"; 3 - import { Link } from "react-router-dom"; 3 + import { useNavigate } from "react-router-dom"; 4 4 5 5 import { ThinContainer } from "@/components/layout/ThinContainer"; 6 6 import { Ol } from "@/components/utils/Ol"; ··· 41 41 42 42 export function AboutPage() { 43 43 const { t } = useTranslation(); 44 + const navigate = useNavigate(); 45 + 44 46 return ( 45 47 <SubPageLayout> 46 48 <PageTitle subpage k="global.pages.about" /> ··· 71 73 style={{ display: "flex", justifyContent: "space-between" }} 72 74 className="w-full" 73 75 > 74 - <Link to="/flix"> 75 - <Button className="py-px mt-8 box-content bg-buttons-secondary hover:bg-buttons-secondaryHover bg-opacity-90 text-buttons-secondaryText justify-center items-center"> 76 - Top Flix 77 - </Button> 78 - </Link> 79 - <Link to="/support"> 80 - <Button className="py-px mt-8 box-content bg-buttons-secondary hover:bg-buttons-secondaryHover bg-opacity-90 text-buttons-secondaryText justify-center items-center"> 81 - Support 82 - </Button> 83 - </Link> 76 + <Button 77 + className="py-px mt-8 box-content bg-buttons-secondary hover:bg-buttons-secondaryHover bg-opacity-90 text-buttons-secondaryText justify-center items-center" 78 + onClick={() => navigate("/flix")} 79 + > 80 + Top Flix 81 + </Button> 82 + <Button 83 + className="py-px mt-8 box-content bg-buttons-secondary hover:bg-buttons-secondaryHover bg-opacity-90 text-buttons-secondaryText justify-center items-center" 84 + onClick={() => navigate("/support")} 85 + > 86 + Support 87 + </Button> 84 88 </div> 85 89 </ThinContainer> 86 90 </SubPageLayout>