feat: refactor

This commit is contained in:
Zamitto 2024-09-12 20:52:54 -03:00
parent 3199e56661
commit 813a46bf3e

View File

@ -3,8 +3,7 @@ import * as styles from "./hero.css";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { TrendingGame } from "@types"; import { TrendingGame } from "@types";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import Skeleton, { SkeletonTheme } from "react-loading-skeleton"; import Skeleton from "react-loading-skeleton";
import { vars } from "@renderer/theme.css";
export function Hero() { export function Hero() {
const [featuredGameDetails, setFeaturedGameDetails] = useState< const [featuredGameDetails, setFeaturedGameDetails] = useState<
@ -30,11 +29,7 @@ export function Hero() {
}, [i18n.language]); }, [i18n.language]);
if (isLoading) { if (isLoading) {
return ( return <Skeleton className={styles.hero} />;
<SkeletonTheme baseColor={vars.color.background} highlightColor="#444">
<Skeleton className={styles.hero} />
</SkeletonTheme>
);
} }
if (featuredGameDetails?.length) { if (featuredGameDetails?.length) {