diff --git a/app/(home-pages)/home/Actions/AccountSettings.tsx b/app/(home-pages)/home/Actions/AccountSettings.tsx index 67df4f37..b1ef31bc 100644 --- a/app/(home-pages)/home/Actions/AccountSettings.tsx +++ b/app/(home-pages)/home/Actions/AccountSettings.tsx @@ -11,9 +11,14 @@ import { GoBackSmall } from "components/Icons/GoBackSmall"; import { useState } from "react"; import { ThemeSetterContent } from "components/ThemeManager/ThemeSetter"; import { useIsMobile } from "src/hooks/isMobile"; +import { ManageProSubscription } from "app/lish/[did]/[publication]/dashboard/settings/ManageProSubscription"; +import { Modal } from "components/Modal"; +import { UpgradeContent } from "app/lish/[did]/[publication]/UpgradeModal"; export const AccountSettings = (props: { entityID: string }) => { - let [state, setState] = useState<"menu" | "general" | "theme">("menu"); + let [state, setState] = useState< + "menu" | "general" | "theme" | "manage-subscription" + >("menu"); let isMobile = useIsMobile(); return ( @@ -32,6 +37,8 @@ export const AccountSettings = (props: { entityID: string }) => { entityID={props.entityID} backToMenu={() => setState("menu")} /> + ) : state === "manage-subscription" ? ( + setState("menu")} /> ) : ( )} @@ -40,12 +47,14 @@ export const AccountSettings = (props: { entityID: string }) => { }; const SettingsMenu = (props: { - state: "menu" | "general" | "theme"; + state: "menu" | "general" | "theme" | "manage-subscription"; setState: (s: typeof props.state) => void; }) => { let menuItemClassName = "menuItem -mx-[8px] text-left flex items-center justify-between hover:no-underline!"; + let isPro = true; + return (
@@ -67,6 +76,28 @@ const SettingsMenu = (props: { Account Theme + {!isPro ? ( + + Get Leaflet Pro + {" "} +
+ } + > + + + ) : ( + + )} ); }; diff --git a/app/lish/[did]/[publication]/dashboard/Actions.tsx b/app/lish/[did]/[publication]/dashboard/Actions.tsx index 6c257252..40787905 100644 --- a/app/lish/[did]/[publication]/dashboard/Actions.tsx +++ b/app/lish/[did]/[publication]/dashboard/Actions.tsx @@ -22,7 +22,6 @@ export const Actions = (props: { publication: string }) => { - ); }; @@ -98,26 +97,3 @@ const MobileUpgrade = () => { /> ); }; - -const DesktopUpgrade = () => { - return ( -
-

Get Leaflet Pro

-
- Analytics! Emails and membership soon. -
- - Learn more - - } - /> - Dismiss -
- ); -}; diff --git a/app/lish/[did]/[publication]/dashboard/PublicationAnalytics.tsx b/app/lish/[did]/[publication]/dashboard/PublicationAnalytics.tsx index f856fd09..cd8ab76b 100644 --- a/app/lish/[did]/[publication]/dashboard/PublicationAnalytics.tsx +++ b/app/lish/[did]/[publication]/dashboard/PublicationAnalytics.tsx @@ -11,7 +11,6 @@ import { ComboboxResult, useComboboxState, } from "components/Combobox"; -import { Input } from "components/Input"; type referrorType = { iconSrc: string; name: string; viewCount: string }; let refferors = [ @@ -104,7 +103,7 @@ const PostSelector = (props: { posts.filter((post) => post.toLowerCase().includes(searchValue.toLowerCase()), ), - [searchValue], + [searchValue, posts], ); let filteredPostsWithClear = ["All Posts", ...(filteredPosts || [])]; @@ -132,6 +131,7 @@ const PostSelector = (props: { return ( <> { props.setSelectedPost(undefined); @@ -147,18 +147,17 @@ const PostSelector = (props: { ); return ( - <> - { - props.setSelectedPost(post); - }} - highlighted={highlighted} - setHighlighted={setHighlighted} - > - {post} - - + { + props.setSelectedPost(post); + }} + highlighted={highlighted} + setHighlighted={setHighlighted} + > + {post} + ); })} @@ -261,6 +260,7 @@ const TopReferrors = (props: { return ( <> + {!isPro ? ( + + Get Leaflet Pro + {" "} + + } + > + + + ) : ( + + )} ); }; export const PubSettingsHeader = (props: { - state: menuState; backToMenuAction?: () => void; - loading: boolean; - setLoadingAction: (l: boolean) => void; + loading?: boolean; + setLoadingAction?: (l: boolean) => void; children: React.ReactNode; }) => { return (
{props.children} - {props.state !== "menu" && ( + {props.backToMenuAction && (
- - - {props.loading ? : "Update"} - + {props.setLoadingAction && ( + + {props.loading ? : "Update"} + + )}
)}