diff --git a/CLAUDE.md b/CLAUDE.md index a2b07439..7dc6a047 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -71,4 +71,4 @@ To add or modify a lexicon: - **React contexts**: `DocumentProvider`, `LeafletContentProvider` for page-level data - **Inngest functions**: Async jobs in `app/api/inngest/functions/` - **Icons**: Icon components live in `components/Icons/`. Each icon is a named export in its own file (e.g. `RefreshSmall.tsx`), imports `Props` from `./Props`, spreads `{...props}` on the `` element, and uses `fill="currentColor"` instead of hardcoded colors like `fill="black"`. -- **Popovers and menus**: Use the existing `Popover` (`components/Popover`), `Menu`, and `MenuItem` (`components/Menu`) components — do not create new popover/menu primitives +- **Popovers and menus**: Use the existing `Popover` (`components/Popover`), `Menu`, and `MenuItem` (`components/Menu`) components — do not create new popover/menu primitives. Avoid using buttons inside Popover or Modal triggers unless using a specific button component. If button is being used as trigger, always add an "asChild" prop to the Menu or Popover diff --git a/app/(home-pages)/home/Actions/Actions.tsx b/app/(home-pages)/home/Actions/Actions.tsx index 6720edc0..743e6721 100644 --- a/app/(home-pages)/home/Actions/Actions.tsx +++ b/app/(home-pages)/home/Actions/Actions.tsx @@ -2,7 +2,7 @@ import { ThemePopover } from "components/ThemeManager/ThemeSetter"; import { CreateNewLeafletButton } from "./CreateNewButton"; import { HelpButton } from "app/[leaflet_id]/actions/HelpButton"; -import { AccountSettings } from "./AccountSettings"; +import { HomeThemeSetter } from "./HomeThemeSetter"; import { useIdentityData } from "components/IdentityProvider"; import { useReplicache } from "src/replicache"; @@ -12,7 +12,7 @@ export const Actions = () => { return ( <> - {identity && } + {identity && } ); }; diff --git a/app/(home-pages)/home/Actions/CreateNewButton.tsx b/app/(home-pages)/home/Actions/CreateNewButton.tsx index 454ae7ca..44acafc0 100644 --- a/app/(home-pages)/home/Actions/CreateNewButton.tsx +++ b/app/(home-pages)/home/Actions/CreateNewButton.tsx @@ -24,6 +24,7 @@ export const CreateNewLeafletButton = (props: {}) => { align={isMobile ? "center" : "start"} trigger={ diff --git a/app/(home-pages)/home/Actions/HomeHelp.tsx b/app/(home-pages)/home/Actions/HomeHelp.tsx deleted file mode 100644 index 83c5d3d5..00000000 --- a/app/(home-pages)/home/Actions/HomeHelp.tsx +++ /dev/null @@ -1,27 +0,0 @@ -"use client"; -import { ActionButton } from "components/ActionBar/ActionButton"; -import { HelpSmall } from "components/Icons/HelpSmall"; -import { Popover } from "components/Popover"; - -export const HomeHelp = () => { - return ( - } label="Info" />} - > -
-

- Leaflets are saved to home per-device / browser using - cookies. -

-

- If you clear your cookies, they'll disappear. -

-

- Please contact us for help - recovering Leaflets! -

-
- - ); -}; diff --git a/app/(home-pages)/home/Actions/AccountSettings.tsx b/app/(home-pages)/home/Actions/HomeThemeSetter.tsx similarity index 89% rename from app/(home-pages)/home/Actions/AccountSettings.tsx rename to app/(home-pages)/home/Actions/HomeThemeSetter.tsx index 6d065766..0053c2d3 100644 --- a/app/(home-pages)/home/Actions/AccountSettings.tsx +++ b/app/(home-pages)/home/Actions/HomeThemeSetter.tsx @@ -6,9 +6,9 @@ import { ThemeSetterContent } from "components/ThemeManager/ThemeSetter"; import { useIsMobile } from "src/hooks/isMobile"; import { PaintSmall } from "components/Icons/PaintSmall"; -export const AccountSettings = (props: { entityID: string }) => { +export const HomeThemeSetter = (props: { entityID: string }) => { let isMobile = useIsMobile(); - + if (isMobile) return null; return ( } controls={ - -
+
{tabs.map((tab) => (
-
+ {children}