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;