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

Use useIsMobile to only show the text on large displays

This commit is contained in:
Cooper Ransom 2024-03-26 13:14:57 -04:00
parent 657b63858c
commit cfd43c789d

View file

@ -2,13 +2,14 @@ import classNames from "classnames";
import { useTranslation } from "react-i18next";
import { Icon, Icons } from "@/components/Icon";
import { useIsMobile } from "@/hooks/useIsMobile";
export function BrandPill(props: {
clickable?: boolean;
// hideTextOnMobile?: boolean;
backgroundClass?: string;
}) {
const { t } = useTranslation();
const isMobile = useIsMobile();
return (
<div
@ -21,6 +22,14 @@ export function BrandPill(props: {
)}
>
<Icon className="text-2xl" icon={Icons.MOVIE_WEB} />
<span
className={[
"font-semibold text-white",
isMobile ? "hidden sm:block" : "",
].join(" ")}
>
{t("global.name")}
</span>
</div>
);
}