e {
            $('.nav-sidebar').removeClass('text-sm');
            localStorage.removeItem("sidebarSmallFontSwitch");
        }
    }

    function toggleSidebarCompact() {
        if ($("#sidebarCompactSwitch").is(':checked')) {
            $('.nav-sidebar').addClass('nav-compact');
            localStorage.setItem("sidebarCompactSwitch", "true");
        } else {
            localStorage.removeItem("sidebarCompactSwitch");
            $('.nav-sidebar').removeClass('nav-compact');
        }