diff --git a/clients/apps/web/src/app/dashboard/[organization]/(topbar)/(home)/ClientPage.tsx b/clients/apps/web/src/app/dashboard/[organization]/(topbar)/(home)/ClientPage.tsx index 9b56124b36..aaf6f97b67 100644 --- a/clients/apps/web/src/app/dashboard/[organization]/(topbar)/(home)/ClientPage.tsx +++ b/clients/apps/web/src/app/dashboard/[organization]/(topbar)/(home)/ClientPage.tsx @@ -2,9 +2,6 @@ import { DashboardBody } from '@/components/Layout/DashboardLayout' import { CreatorUpsell } from '@/components/Onboarding/Creator/CreatorUpsell' -import { NewsFromPolar } from '@/components/Onboarding/Creator/NewsFromPolar' -import { PostWizard } from '@/components/Onboarding/Creator/PostWizard' -import { SetupSubscriptions } from '@/components/Onboarding/Creator/SetupSubscriptions' import { AccountWidget } from '@/components/Widgets/AccountWidget' import { ActivityWidget } from '@/components/Widgets/ActivityWidget' import { OrdersWidget } from '@/components/Widgets/OrdersWidget' @@ -31,9 +28,6 @@ const OverviewPage: React.FC = ({}) => { - - - ) } diff --git a/clients/apps/web/src/components/Onboarding/Creator/Goal.tsx b/clients/apps/web/src/components/Onboarding/Creator/Goal.tsx deleted file mode 100644 index cb984fdf80..0000000000 --- a/clients/apps/web/src/components/Onboarding/Creator/Goal.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { motion } from 'framer-motion' - -export interface GoalProps { - title: string - value: number - max: number -} - -export const Goal = ({ title, value, max }: GoalProps) => { - return ( -
-
-

{title}

- - {value} / {max} - -
-
-
- -
-
-
- ) -} diff --git a/clients/apps/web/src/components/Onboarding/Creator/NewsFromPolar.tsx b/clients/apps/web/src/components/Onboarding/Creator/NewsFromPolar.tsx deleted file mode 100644 index 1efac63d4e..0000000000 --- a/clients/apps/web/src/components/Onboarding/Creator/NewsFromPolar.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import LogoIcon from '@/components/Brand/LogoIcon' -import { ArrowForward } from '@mui/icons-material' -import Link from 'next/link' -import { - Card, - CardContent, - CardFooter, -} from 'polarkit/components/ui/atoms/card' - -export const NewsFromPolar = () => { - return ( -
-
- -

New Features

-

- Some of the latest features and updates along with Tips & Tricks for - your journey with Polar -

-
-
- - - - - -

- Introducing GitHub Repository Benefit -

-

- You can now seamlessly offer subscribers on Polar access to one, - two, three... or countless private GitHub repositories. This opens - up and streamlines unlimited possibilities, monetization- and - funding models. -

- - Learn more in our announcement post - - -
-
-
-
- ) -} diff --git a/clients/apps/web/src/components/Onboarding/Creator/PostWizard.tsx b/clients/apps/web/src/components/Onboarding/Creator/PostWizard.tsx deleted file mode 100644 index efd31911f0..0000000000 --- a/clients/apps/web/src/components/Onboarding/Creator/PostWizard.tsx +++ /dev/null @@ -1,199 +0,0 @@ -import { AnimatedIconButton } from '@/components/Feed/Posts/Post' -import { useListArticles } from '@/hooks/queries' -import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' -import { - ArrowForward, - BiotechOutlined, - EditNoteOutlined, - EmojiPeople, - ShortTextOutlined, -} from '@mui/icons-material' -import { Article, Organization } from '@polar-sh/sdk' -import Link from 'next/link' -import { - Card, - CardContent, - CardFooter, - CardHeader, -} from 'polarkit/components/ui/atoms/card' -import { List, ListItem } from 'polarkit/components/ui/atoms/list' -import { useContext, useRef } from 'react' -import { useHoverDirty } from 'react-use' - -const postTemplates = (organization: Organization, hasNoPosts: boolean) => - [ - hasNoPosts - ? { - title: 'Hello World', - description: - "Introduce yourself and your projects. Let people know who you are & what you're working on.", - icon: ( - - ), - link: `/dashboard/${organization.slug}/posts/new`, - } - : { - title: 'TIL', - description: - "Share a few paragraphs on something you've learned recently. It could be a new tool, a new language, or a new concept.", - icon: ( - - ), - link: `/dashboard/${organization.slug}/posts/new`, - }, - { - title: 'Technical Deep-dive', - description: - "Proud of a project you've been working on? Share the details & secrets from under the hood.", - icon: ( - - ), - link: `/dashboard/${organization.slug}/posts/new`, - }, - ].slice(0, 2) - -export const PostWizard = () => { - const { organization: org } = useContext(MaintainerOrganizationContext) - - const { data: posts, isPending: articlesPending } = useListArticles({ - organizationId: org.id, - limit: 100, - }) - - const publishedPosts = - posts?.pages[0].items?.filter((post) => !!post.published_at) ?? [] - - const drafts = - posts?.pages[0].items?.filter((post) => !post.published_at) ?? [] - - if (!org.feature_settings?.articles_enabled) return null - - return ( -
-
- -

Start Writing

-

- Build out an audience by writing posts and share it with your - subscribers -

-
- {!articlesPending && ( -
-
- {postTemplates(org, publishedPosts.length < 1).map((template) => ( - - ))} -
- {drafts.length > 0 && ( -
-

- {drafts.length} Unpublished - {drafts.length === 1 ? ' Post' : ' Posts'} -

- - {drafts.map((draft) => ( - - - - ))} - -
- )} -
- )} -
- ) -} - -export const PublicPagePostWizard = ({ - organization, -}: { - organization: Organization -}) => { - return ( -
- {postTemplates(organization, true).map((template) => ( - - ))} -
- ) -} - -interface PostCardProps { - title: string - description: string - icon: React.ReactNode - link: string -} - -const PostCard = ({ icon, title, description, link }: PostCardProps) => { - const ref = useRef(null) - const isHovered = useHoverDirty(ref) - - return ( - - - - {icon} -

{title}

-
- -

{description}

-
- - - - - -
- - ) -} - -const DraftPost = ({ - organization, - draft, -}: { - organization: Organization - draft: Article -}) => { - const ref = useRef(null) - const isHovered = useHoverDirty(ref) - - return ( - -
-

{draft.title}

- - {draft.visibility} - -
- - - - - ) -} diff --git a/clients/apps/web/src/components/Onboarding/Creator/SetupSubscriptions.tsx b/clients/apps/web/src/components/Onboarding/Creator/SetupSubscriptions.tsx deleted file mode 100644 index 420223fad4..0000000000 --- a/clients/apps/web/src/components/Onboarding/Creator/SetupSubscriptions.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import SubscriptionTierCard from '@/components/Subscriptions/SubscriptionTierCard' -import { useProducts } from '@/hooks/queries' -import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' -import { ArrowForwardOutlined, Bolt } from '@mui/icons-material' -import Link from 'next/link' -import Button from 'polarkit/components/ui/atoms/button' -import { useContext } from 'react' - -export const SetupSubscriptions = () => { - const { organization: org } = useContext(MaintainerOrganizationContext) - const { data: products } = useProducts(org.id ?? '') - - const hasPaidSubscriptionTiers = products?.items?.some( - (tier) => tier.type === 'individual' || tier.type === 'business', - ) - - if ( - !org || - hasPaidSubscriptionTiers || - !org.feature_settings?.subscriptions_enabled - ) - return null - - return ( -
-
-
- -

Subscription Tiers

-

- Create a few subscription tiers to offer your followers and - supporters -

- - - -
-
- - - -
-
-
- ) -}