From 1c959fbbfd401c802e5ee54f81f59a2a37c955b4 Mon Sep 17 00:00:00 2001 From: APPLE Date: Sat, 26 Feb 2022 20:17:55 +0100 Subject: [PATCH] removed window.ineerwidth --- package-lock.json | 7 ++++++- src/components/Sidebar/SidebarContent/SidebarContent.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4a6f08..8de9b7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cdbreact", - "version": "1.3.1", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3745,6 +3745,11 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, + "bootstrap": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==" + }, "bootstrap-css-only": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/bootstrap-css-only/-/bootstrap-css-only-4.4.1.tgz", diff --git a/src/components/Sidebar/SidebarContent/SidebarContent.js b/src/components/Sidebar/SidebarContent/SidebarContent.js index f67d79e..0421149 100644 --- a/src/components/Sidebar/SidebarContent/SidebarContent.js +++ b/src/components/Sidebar/SidebarContent/SidebarContent.js @@ -12,7 +12,7 @@ const SidebarContent = forwardRef(({ children, className, ...rest }, ref) => { const { handleToggleSidebar, breakpoint } = useContext(SidebarContext); - const [width, setWidth] = useState(window.innerWidth); + const [width, setWidth] = useState(0); const finalbreakpoint = breakpoint || 720;