mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix warnings
This commit is contained in:
parent
ee7b139093
commit
c8fa8f99d2
2 changed files with 8 additions and 13 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { UserProfile } from "@types";
|
import { UserProfile } from "@types";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import * as styles from "./profile.css";
|
import * as styles from "./profile.css";
|
||||||
import { SPACING_UNIT, vars } from "@renderer/theme.css";
|
import { SPACING_UNIT, vars } from "@renderer/theme.css";
|
||||||
|
|
||||||
|
@ -8,9 +7,6 @@ export interface ProfileContentProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
|
export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
|
||||||
const { t } = useTranslation("profile");
|
|
||||||
|
|
||||||
console.log(userProfile.recentGames);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<section className={styles.profileContentBox}>
|
<section className={styles.profileContentBox}>
|
||||||
|
@ -22,7 +18,6 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
|
||||||
|
|
||||||
<div className={styles.profileInformation}>
|
<div className={styles.profileInformation}>
|
||||||
<h3 style={{ fontWeight: "bold" }}>{userProfile.username}</h3>
|
<h3 style={{ fontWeight: "bold" }}>{userProfile.username}</h3>
|
||||||
<p style={{ fontSize: 12 }}>Jogando ABC</p>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -55,15 +50,15 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
|
||||||
>
|
>
|
||||||
{userProfile.recentGames.map((game) => {
|
{userProfile.recentGames.map((game) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div key={game.objectID}>
|
||||||
<img
|
<img
|
||||||
src={game.cover}
|
src={game.cover}
|
||||||
width={50}
|
width={50}
|
||||||
height={50}
|
height={50}
|
||||||
alt={"Icon for " + game.title}
|
alt={"Icon for " + game.title}
|
||||||
/>
|
/>
|
||||||
<p key={game.objectID}>{game.title}</p>
|
<p>{game.title}</p>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,17 +89,17 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
|
||||||
className={styles.profileContentBox}
|
className={styles.profileContentBox}
|
||||||
style={{ flexDirection: "column" }}
|
style={{ flexDirection: "column" }}
|
||||||
>
|
>
|
||||||
{userProfile.libraryGames.map((game) => {
|
{userProfile.libraryGames.map((game, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div key={game.objectID}>
|
||||||
<img
|
<img
|
||||||
src={game.cover}
|
src={game.cover}
|
||||||
width={50}
|
width={50}
|
||||||
height={50}
|
height={50}
|
||||||
alt={"Icon for " + game.title}
|
alt={"Icon for " + game.title}
|
||||||
/>
|
/>
|
||||||
<p key={game.objectID}>{game.title}</p>
|
<p>{game.title}</p>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const Profile = () => {
|
||||||
setUserProfile(userProfile);
|
setUserProfile(userProfile);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, [dispatch]);
|
}, [dispatch, username]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SkeletonTheme baseColor={vars.color.background} highlightColor="#444">
|
<SkeletonTheme baseColor={vars.color.background} highlightColor="#444">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue