1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Convet /route#route to the sexier useNavigation

This commit is contained in:
Cooper Ransom 2024-03-17 21:35:16 -04:00
parent beb832a7ec
commit 603b6b4510
2 changed files with 18 additions and 13 deletions

View file

@ -1,5 +1,5 @@
import classNames from "classnames";
import { Link } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import { NoUserAvatar, UserAvatar } from "@/components/Avatar";
import { IconPatch } from "@/components/buttons/IconPatch";
@ -21,6 +21,7 @@ export interface NavigationProps {
export function Navigation(props: NavigationProps) {
const bannerHeight = useBannerSize();
const navigate = useNavigate();
const { loggedIn } = useAuth();
return (
@ -103,7 +104,7 @@ export function Navigation(props: NavigationProps) {
<IconPatch icon={Icons.GITHUB} clickable downsized />
</a>
<a
href="/flix#flix"
onClick={() => navigate("/flix")}
rel="noreferrer"
className="text-xl text-white tabbable rounded-full"
>

View file

@ -1,6 +1,6 @@
import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { ThinContainer } from "@/components/layout/ThinContainer";
import { Ol } from "@/components/utils/Ol";
@ -41,6 +41,8 @@ function Button(props: {
export function AboutPage() {
const { t } = useTranslation();
const navigate = useNavigate();
return (
<SubPageLayout>
<PageTitle subpage k="global.pages.about" />
@ -71,16 +73,18 @@ export function AboutPage() {
style={{ display: "flex", justifyContent: "space-between" }}
className="w-full"
>
<Link to="/flix">
<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">
<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"
onClick={() => navigate("/flix")}
>
Top Flix
</Button>
</Link>
<Link to="/support">
<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">
<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"
onClick={() => navigate("/support")}
>
Support
</Button>
</Link>
</div>
</ThinContainer>
</SubPageLayout>