diff --git a/clients/apps/web/src/components/Notifications/Popover.tsx b/clients/apps/web/src/components/Notifications/Popover.tsx index 89545efc0c..b64ec7f36c 100644 --- a/clients/apps/web/src/components/Notifications/Popover.tsx +++ b/clients/apps/web/src/components/Notifications/Popover.tsx @@ -20,7 +20,7 @@ import { MaintainerPledgePendingNotification, MaintainerPledgedIssueConfirmationPendingNotification, MaintainerPledgedIssuePendingNotification, - NotificationsInner, + NotificationsListNotificationsInner, PledgerPledgePendingNotification, RewardPaidNotification, TeamAdminMemberPledgedNotification, @@ -37,7 +37,7 @@ import Icon from '../Icons/Icon' import { Modal } from '../Modal' import { useModal } from '../Modal/useModal' -type NotificationSchema = NotificationsInner +type NotificationSchema = NotificationsListNotificationsInner const Popover = () => { const [show, setShow] = useState(false) diff --git a/clients/apps/web/src/hooks/queries/checkout_links.ts b/clients/apps/web/src/hooks/queries/checkout_links.ts index cb975d72fa..6617094234 100644 --- a/clients/apps/web/src/hooks/queries/checkout_links.ts +++ b/clients/apps/web/src/hooks/queries/checkout_links.ts @@ -7,12 +7,12 @@ import { CheckoutLinksApiListRequest, CheckoutLinksApiUpdateRequest, ListResourceCheckoutLink, - OrganizationIDFilter, + OrganizationIDFilter1, } from '@polar-sh/sdk' import { defaultRetry } from './retry' export const useCheckoutLinks = ( - organizationId: OrganizationIDFilter, + organizationId: OrganizationIDFilter1, parameters?: Omit, ) => useQuery({ @@ -33,10 +33,7 @@ export const useCreateCheckoutLink = () => onSuccess: (result, _variables, _ctx) => { queryClient.setQueriesData( { - queryKey: [ - 'checkout_links', - { productId: result.product.id }, - ], + queryKey: ['checkout_links', { productId: result.product.id }], }, (old) => { if (!old) { @@ -69,10 +66,7 @@ export const useUpdateCheckoutLink = () => onSuccess: (result, _variables, _ctx) => { queryClient.setQueriesData( { - queryKey: [ - 'checkout_links', - { productId: result.product.id }, - ], + queryKey: ['checkout_links', { productId: result.product.id }], }, (old) => { if (!old) { @@ -105,9 +99,12 @@ export const useDeleteCheckoutLink = () => }, onSuccess: (_result, variables, _ctx) => { queryClient.invalidateQueries({ - queryKey: ['checkout_links', { - productId: variables.product.id - }], + queryKey: [ + 'checkout_links', + { + productId: variables.product.id, + }, + ], }) }, }) diff --git a/clients/apps/web/src/hooks/queries/products.ts b/clients/apps/web/src/hooks/queries/products.ts index efcad6584f..f0e1f23b4b 100644 --- a/clients/apps/web/src/hooks/queries/products.ts +++ b/clients/apps/web/src/hooks/queries/products.ts @@ -2,7 +2,7 @@ import revalidate from '@/app/actions' import { api, queryClient } from '@/utils/api' import { Organization, - OrganizationIDFilter, + OrganizationIDFilter1, ProductBenefitsUpdate, ProductCreate, ProductUpdate, @@ -12,7 +12,7 @@ import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' export const useProducts = ( - organizationId?: OrganizationIDFilter, + organizationId?: OrganizationIDFilter1, parameters?: Omit, ) => useQuery({ diff --git a/clients/apps/web/src/utils/auth.ts b/clients/apps/web/src/utils/auth.ts index a008f7235b..c8b8fc1582 100644 --- a/clients/apps/web/src/utils/auth.ts +++ b/clients/apps/web/src/utils/auth.ts @@ -12,13 +12,13 @@ export const getGitHubAuthorizeURL = ( params: IntegrationsGithubApiIntegrationsGithubAuthorizeRequest, ): string => { const searchParams = new URLSearchParams() - if (params.paymentIntentId !== undefined) { + if (params.paymentIntentId) { searchParams.set('payment_intent_id', params.paymentIntentId) } - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } - if (params.attribution !== undefined) { + if (params.attribution) { searchParams.set('attribution', params.attribution) } return `${getServerURL()}/v1/integrations/github/authorize?${searchParams}` @@ -28,10 +28,10 @@ export const getGoogleAuthorizeURL = ( params: IntegrationsGoogleApiIntegrationsGoogleAuthorizeRequest, ): string => { const searchParams = new URLSearchParams() - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } - if (params.attribution !== undefined) { + if (params.attribution) { searchParams.set('attribution', params.attribution) } return `${getServerURL()}/v1/integrations/google/authorize?${searchParams}` @@ -41,7 +41,7 @@ export const getGitHubOrganizationInstallationURL = ( params: IntegrationsGithubApiRedirectToOrganizationInstallationRequest, ): string => { const searchParams = new URLSearchParams() - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } return `${getServerURL()}/v1/integrations/github/organizations/${ @@ -53,7 +53,7 @@ export const getMagicLinkAuthenticateURL = ( params: MagicLinkApiMagicLinkAuthenticateRequest, ): string => { const searchParams = new URLSearchParams({ token: params.token }) - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } return `${getServerURL()}/v1/magic_link/authenticate?${searchParams}` @@ -63,7 +63,7 @@ export const getBotDiscordAuthorizeURL = ( params: IntegrationsDiscordApiIntegrationsDiscordBotAuthorizeRequest, ): string => { const searchParams = new URLSearchParams() - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } return `${getServerURL()}/v1/integrations/discord/bot/authorize?${searchParams}` @@ -73,7 +73,7 @@ export const getGitHubRepositoryBenefitAuthorizeURL = ( params: IntegrationsGithubRepositoryBenefitApiIntegrationsGithubRepositoryBenefitUserAuthorizeRequest, ): string => { const searchParams = new URLSearchParams() - if (params.returnTo !== undefined) { + if (params.returnTo) { searchParams.set('return_to', params.returnTo) } return `${getServerURL()}/v1/integrations/github_repository_benefit/user/authorize?${searchParams}`