import { bmcDarkTheme, bmcLightTheme } from "@/utils/BmcTheme"; import { getFeedbackLink, githubLinks, personalLinks } from "@/utils/links"; import { useTheme } from "@/utils/useTheme"; import * as fui from "@fluentui/react-components"; import { PersonFeedbackRegular } from "@fluentui/react-icons"; import { ReactElement, ReactNode } from "react"; import { useStyles } from "./AboutSection.styles"; export default function AboutSection(): ReactElement { const bmcTheme = useTheme(bmcLightTheme, bmcDarkTheme); const cls = useStyles(); return (
{ i18n.t("manifest.name") } v{ browser.runtime.getManifest().version }
{ i18n.t("about.developed_by") } ({ link("@xfox111.net", personalLinks.social) })
{ i18n.t("about.licensed_under") } { link(i18n.t("about.mit_license"), githubLinks.license) }
{ i18n.t("about.translation_cta.text") }
{ link(i18n.t("about.translation_cta.button"), githubLinks.translationGuide) }
{ link(i18n.t("about.links.website"), personalLinks.website) }
{ link(i18n.t("about.links.source"), githubLinks.repository) }
{ link(i18n.t("about.links.changelog"), githubLinks.changelog) }
) }> { i18n.t("about.cta.feedback") } ) }> { i18n.t("about.cta.sponsor") }
); }; const link = (text: string, href: string): ReactNode => ( { text } ); const buttonProps = (href: string, icon: JSX.Element): fui.ButtonProps => ( { as: "a", target: "_blank", href, appearance: "primary", icon } );