Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
e-maad committed Oct 28, 2024
1 parent e9aeed5 commit 8f5f592
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const PADDING_Y = 34;

export const TeamCreationBanner = () => {
const [isBannerVisible, setIsBannerVisible] = useState(false);
const [position, setPosition] = useState<{x?: number; y?: number}>({});
const [position, setPosition] = useState<{x: number; y: number}>({x: 0, y: 0});
const {status: sidebarStatus} = useSidebarStore();
const clickHandler = (event: React.MouseEvent<HTMLButtonElement>) => {
setIsBannerVisible(true);
Expand All @@ -77,8 +77,8 @@ export const TeamCreationBanner = () => {
{isBannerVisible && (
<BannerPortal
// Position + padding
positionX={(position.x || 0) + PADDING_X}
positionY={(position.y || 0) + PADDING_Y}
positionX={position.x + PADDING_X}
positionY={position.y + PADDING_Y}
onClose={() => setIsBannerVisible(false)}
>
<Banner />
Expand Down

0 comments on commit 8f5f592

Please sign in to comment.