From 77c63aa1243ca88ef49d01e990ad9ebcfa2c1d47 Mon Sep 17 00:00:00 2001 From: Birk Jernstrom Date: Wed, 6 Nov 2024 16:18:59 +0100 Subject: [PATCH] clients: Tighten up GitHub link promotion --- .../Storefront/StorefrontSidebar.tsx | 72 +++++++++---------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx b/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx index 6c21c4cc4b..2a4a4795c9 100644 --- a/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx +++ b/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx @@ -1,10 +1,10 @@ 'use client' +import { CONFIG } from '@/utils/config' import { computeComplementaryColor } from '@/components/Profile/utils' import { useUpdateOrganization } from '@/hooks/queries' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { setValidationErrors } from '@/utils/api/errors' -import GitHubIcon from '@/components/Icons/GitHubIcon' import { ErrorMessage } from '@hookform/error-message' import { AddPhotoAlternateOutlined } from '@mui/icons-material' import { @@ -34,6 +34,8 @@ import { FileRejection } from 'react-dropzone' import { useFormContext } from 'react-hook-form' import { twMerge } from 'tailwind-merge' import { FileObject, useFileUpload } from '../../FileUpload' +import { Separator } from 'polarkit/components/ui/separator' +import { Label } from 'polarkit/components/ui/label' const colorThemes = [ '#121316', @@ -329,7 +331,7 @@ export const StorefrontSidebar = () => { ) const storefrontEnabled = organization.profile_settings?.enabled ?? false - const githubFundingYAML = `polar: ${organization.slug}` + const storefrontURL = `${CONFIG.FRONTEND_BASE_URL}/${organization.slug}` return ( { enabled={organization.profile_settings?.enabled ?? false} organization={organization} > -
- - -
-
- - - Promote on GitHub - -
-
- -

- Polar storefronts are officially supported by GitHub. -

- + + + -
+ + {storefrontEnabled && ( + <> + -
- -
- +
+ + +

+ Add an official link from GitHub to Polar.{' '} + Learn more. +

+
+ + )} +