feat: get iconUrl

This commit is contained in:
Zamitto 2024-06-13 00:39:11 -03:00
parent c8fa8f99d2
commit 6b2549ed13
4 changed files with 34 additions and 11 deletions

View file

@ -1,4 +1,5 @@
import { UserProfile } from "@types";
import cn from "classnames";
import * as styles from "./profile.css";
import { SPACING_UNIT, vars } from "@renderer/theme.css";
@ -22,7 +23,7 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
</section>
<div className={styles.profileContent}>
<div style={{ width: "100%" }}>
<div className={styles.profileGameSection}>
<div
style={{
display: "flex",
@ -52,7 +53,7 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
return (
<div key={game.objectID}>
<img
src={game.cover}
src={game.iconUrl}
width={50}
height={50}
alt={"Icon for " + game.title}
@ -64,7 +65,7 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
</div>
</div>
<div className={styles.contentSidebar}>
<div className={cn(styles.contentSidebar, styles.profileGameSection)}>
<div
style={{
display: "flex",
@ -89,11 +90,11 @@ export const ProfileContent = ({ userProfile }: ProfileContentProps) => {
className={styles.profileContentBox}
style={{ flexDirection: "column" }}
>
{userProfile.libraryGames.map((game, index) => {
{userProfile.libraryGames.map((game) => {
return (
<div key={game.objectID}>
<img
src={game.cover}
src={game.iconUrl}
width={50}
height={50}
alt={"Icon for " + game.title}

View file

@ -6,7 +6,7 @@ export const wrapper = style({
width: "100%",
display: "flex",
flexDirection: "column",
gap: `${SPACING_UNIT * 2}px`,
gap: `${SPACING_UNIT * 3}px`,
});
export const profileContentBox = style({
@ -46,9 +46,15 @@ export const profileContent = style({
gap: `${SPACING_UNIT * 4}px`,
});
export const profileGameSection = style({
width: "100%",
display: "flex",
flexDirection: "column",
gap: `${SPACING_UNIT}px`,
});
export const contentSidebar = style({
width: "100%",
height: "100%",
"@media": {
"(min-width: 768px)": {
width: "100%",