sendou.ink/app/components/layout/TopRightButtons.tsx
Kalle fd48bced91
Migrate Prettier/Eslint/Stylelint setup to Biome (#1772)
* Initial

* CSS lint

* Test CI

* Add 1v1, 2v2, and 3v3 Tags (#1771)

* Initial

* CSS lint

* Test CI

* Rename step

---------

Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
2024-06-24 13:07:17 +03:00

39 lines
924 B
TypeScript

import * as React from "react";
import { useTranslation } from "react-i18next";
import { SUPPORT_PAGE } from "~/utils/urls";
import { LinkButton } from "../Button";
import { HeartIcon } from "../icons/Heart";
import { LanguageChanger } from "./LanguageChanger";
import { ThemeChanger } from "./ThemeChanger";
import { UserItem } from "./UserItem";
export function _TopRightButtons({
showSupport,
isErrored,
}: {
showSupport: boolean;
isErrored: boolean;
}) {
const { t } = useTranslation(["common"]);
return (
<div className="layout__header__right-container">
{showSupport ? (
<LinkButton
to={SUPPORT_PAGE}
size="tiny"
icon={<HeartIcon />}
variant="outlined"
>
{t("common:pages.support")}
</LinkButton>
) : null}
<LanguageChanger />
<ThemeChanger />
{!isErrored ? <UserItem /> : null}
</div>
);
}
export const TopRightButtons = React.memo(_TopRightButtons);