File tree Expand file tree Collapse file tree
app/(main)/(protected)/projects/[projectId]/payments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ function PaymentsLayoutInner({ children }: { children: React.ReactNode }) {
3333 const paymentsConfig = project . useConfig ( ) . payments ;
3434 const updateConfig = useUpdateConfig ( ) ;
3535
36- // Hide banners on the new product page for a cleaner creation experience
36+ // Hide banners on the new product page and product-lines onboarding for a cleaner experience
3737 const isNewProductPage = pathname . endsWith ( '/products/new' ) ;
38+ const hasAnyProductsOrItems = Object . keys ( paymentsConfig . products ) . length > 0 || Object . keys ( paymentsConfig . items ) . length > 0 ;
39+ const isProductLinesOnboarding = pathname . endsWith ( '/product-lines' ) && ! hasAnyProductsOrItems ;
3840
3941 const setupPayments = async ( ) => {
4042 const { url } = await stackAdminApp . setupPayments ( ) ;
@@ -97,8 +99,8 @@ function PaymentsLayoutInner({ children }: { children: React.ReactNode }) {
9799 ) ;
98100 }
99101
100- // On the new product page, skip all banners for a cleaner experience
101- if ( isNewProductPage ) {
102+ // On the new product page and product-lines onboarding , skip all banners for a cleaner experience
103+ if ( isNewProductPage || isProductLinesOnboarding ) {
102104 return (
103105 < StripeConnectProvider >
104106 { children }
You can’t perform that action at this time.
0 commit comments