Shared:Components:PortalLogo: fix for SSR
This commit is contained in:
parent
5f712f87f3
commit
a966d2e948
@ -38,7 +38,9 @@ import type { PortalLogoProps } from "./PortalLogo.types";
|
|||||||
const PortalLogo = ({ className, isResizable = false }: PortalLogoProps) => {
|
const PortalLogo = ({ className, isResizable = false }: PortalLogoProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const [size, setSize] = useState(window.innerWidth);
|
const [size, setSize] = useState(
|
||||||
|
typeof window !== "undefined" ? window.innerWidth : 0,
|
||||||
|
);
|
||||||
|
|
||||||
const onResize = () => {
|
const onResize = () => {
|
||||||
setSize(window.innerWidth);
|
setSize(window.innerWidth);
|
||||||
|
Loading…
Reference in New Issue
Block a user