Skip to content

Commit

Permalink
remove CLS
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Mar 24, 2024
1 parent 1dcdc46 commit d2f07e0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions workspaces/app/src/foundation/components/Spacer.tsx
@@ -1,5 +1,4 @@
import React from 'react';
import { useBoolean, useMount } from 'react-use';
import styled from 'styled-components';

const _Spacer = styled.div<{ $height?: number; $width?: number }>`
Expand All @@ -15,11 +14,5 @@ type Props = {
};

export const Spacer: React.FC<Props> = ({ height, width }) => {
const [mounted, toggleMounted] = useBoolean(false);

useMount(() => {
toggleMounted();
});

return mounted ? <_Spacer $height={height} $width={width} /> : null;
return <_Spacer $height={height} $width={width} />;
};

0 comments on commit d2f07e0

Please sign in to comment.