Remove AddShelfModal usage from Header

Remove AddShelfModal from the Header component: delete its import, the showAddShelfModal state hook, the "Add Shelf" menu button, and the AddShelfModal modal render. Cleans up unused state and UI related to adding shelves; no other behavior changes.
This commit is contained in:
kikootwo
2026-03-04 16:00:36 -05:00
parent efb4f64014
commit 85aa80938a
-17
View File
@@ -12,7 +12,6 @@ import { useAuth } from '@/contexts/AuthContext';
import { Button } from '@/components/ui/Button';
import { VersionBadge } from '@/components/ui/VersionBadge';
import { ChangePasswordModal } from '@/components/ui/ChangePasswordModal';
import { AddShelfModal } from '@/components/ui/AddShelfModal';
import { useSmartDropdownPosition } from '@/hooks/useSmartDropdownPosition';
export function Header() {
@@ -21,7 +20,6 @@ export function Header() {
const [showMobileMenu, setShowMobileMenu] = useState(false);
const [showBookDate, setShowBookDate] = useState(false);
const [showChangePasswordModal, setShowChangePasswordModal] = useState(false);
const [showAddShelfModal, setShowAddShelfModal] = useState(false);
const { containerRef, dropdownRef, positionAbove, style } =
useSmartDropdownPosition(showUserMenu);
@@ -91,15 +89,6 @@ export function Header() {
>
Profile
</Link>
<button
onClick={() => {
setShowUserMenu(false);
setShowAddShelfModal(true);
}}
className="w-full text-left px-4 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"
>
Add Shelf
</button>
{canChangePassword && (
<button
onClick={() => {
@@ -365,12 +354,6 @@ export function Header() {
isOpen={showChangePasswordModal}
onClose={() => setShowChangePasswordModal(false)}
/>
{/* Add Shelf Modal */}
<AddShelfModal
isOpen={showAddShelfModal}
onClose={() => setShowAddShelfModal(false)}
/>
</header>
);
}