Fix welcome background position

This commit is contained in:
Arnaud 2024-11-04 16:40:24 +01:00
parent a27cfb6bc5
commit 0aafc0da30
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -7,6 +7,7 @@ import { DiscordIcon } from "./DiscordIcon";
import { Alert } from "@codex-storage/marketplace-ui-components";
import { AlertIcon } from "../AlertIcon/AlertIcon";
import { useEffect, useRef } from "react";
import { classnames } from "../../utils/classnames";
export function WelcomeCard() {
const ref = useRef<HTMLDivElement>(null);
@ -32,8 +33,15 @@ export function WelcomeCard() {
};
}, [ref.current]);
const clientWidth = ref.current?.clientWidth || 0;
return (
<div className="welcome-card card" ref={ref}>
<div
className={classnames(
["welcome-card card"],
["welcome-card card--tiny", clientWidth <= 800]
)}
ref={ref}>
<div className="card">
<header>
<div>