mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-20 10:18:24 -05:00
* 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>
39 lines
924 B
TypeScript
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);
|