mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 12:50:09 +00:00
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:
@@ -12,7 +12,6 @@ import { useAuth } from '@/contexts/AuthContext';
|
|||||||
import { Button } from '@/components/ui/Button';
|
import { Button } from '@/components/ui/Button';
|
||||||
import { VersionBadge } from '@/components/ui/VersionBadge';
|
import { VersionBadge } from '@/components/ui/VersionBadge';
|
||||||
import { ChangePasswordModal } from '@/components/ui/ChangePasswordModal';
|
import { ChangePasswordModal } from '@/components/ui/ChangePasswordModal';
|
||||||
import { AddShelfModal } from '@/components/ui/AddShelfModal';
|
|
||||||
import { useSmartDropdownPosition } from '@/hooks/useSmartDropdownPosition';
|
import { useSmartDropdownPosition } from '@/hooks/useSmartDropdownPosition';
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
@@ -21,7 +20,6 @@ export function Header() {
|
|||||||
const [showMobileMenu, setShowMobileMenu] = useState(false);
|
const [showMobileMenu, setShowMobileMenu] = useState(false);
|
||||||
const [showBookDate, setShowBookDate] = useState(false);
|
const [showBookDate, setShowBookDate] = useState(false);
|
||||||
const [showChangePasswordModal, setShowChangePasswordModal] = useState(false);
|
const [showChangePasswordModal, setShowChangePasswordModal] = useState(false);
|
||||||
const [showAddShelfModal, setShowAddShelfModal] = useState(false);
|
|
||||||
const { containerRef, dropdownRef, positionAbove, style } =
|
const { containerRef, dropdownRef, positionAbove, style } =
|
||||||
useSmartDropdownPosition(showUserMenu);
|
useSmartDropdownPosition(showUserMenu);
|
||||||
|
|
||||||
@@ -91,15 +89,6 @@ export function Header() {
|
|||||||
>
|
>
|
||||||
Profile
|
Profile
|
||||||
</Link>
|
</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 && (
|
{canChangePassword && (
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -365,12 +354,6 @@ export function Header() {
|
|||||||
isOpen={showChangePasswordModal}
|
isOpen={showChangePasswordModal}
|
||||||
onClose={() => setShowChangePasswordModal(false)}
|
onClose={() => setShowChangePasswordModal(false)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Add Shelf Modal */}
|
|
||||||
<AddShelfModal
|
|
||||||
isOpen={showAddShelfModal}
|
|
||||||
onClose={() => setShowAddShelfModal(false)}
|
|
||||||
/>
|
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user