mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-07 16:03:06 +00:00
Fix welcome background position
This commit is contained in:
parent
a27cfb6bc5
commit
0aafc0da30
@ -7,6 +7,7 @@ import { DiscordIcon } from "./DiscordIcon";
|
|||||||
import { Alert } from "@codex-storage/marketplace-ui-components";
|
import { Alert } from "@codex-storage/marketplace-ui-components";
|
||||||
import { AlertIcon } from "../AlertIcon/AlertIcon";
|
import { AlertIcon } from "../AlertIcon/AlertIcon";
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
|
import { classnames } from "../../utils/classnames";
|
||||||
|
|
||||||
export function WelcomeCard() {
|
export function WelcomeCard() {
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
@ -32,8 +33,15 @@ export function WelcomeCard() {
|
|||||||
};
|
};
|
||||||
}, [ref.current]);
|
}, [ref.current]);
|
||||||
|
|
||||||
|
const clientWidth = ref.current?.clientWidth || 0;
|
||||||
|
|
||||||
return (
|
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">
|
<div className="card">
|
||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user