File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import { ServerStyleSheet as StyledComponentSheets } from "styled-components";
44import { ServerStyleSheets as MaterialUiServerStyleSheets } from "@material-ui/styles" ;
55import favicons from "custom/favicons" ;
66import theme from "custom/reactionTheme" ;
7- import analyticsProviders from "../custom/analytics" ;
7+ import definedPaymentMethods from "custom/paymentMethods" ;
8+ import analyticsProviders from "custom/analytics" ;
89
910/**
1011 * For details about the styled-components SSR code in this file, see https://www.styled-components.com/docs/advanced#nextjs
@@ -36,12 +37,14 @@ class HTMLDocument extends Document {
3637 ...analyticsProviders . map ( ( provider ) => ( {
3738 type : "text/javascript" ,
3839 innerHTML : provider . renderScript ( )
39- } ) ) ,
40- {
41- type : "text/javascript" ,
42- src : "https://js.stripe.com/v3/"
43- }
40+ } ) )
4441 ] ;
42+ definedPaymentMethods
43+ . some ( ( method ) => method . name === "stripe_card" )
44+ && scripts . push ( {
45+ type : "text/javascript" ,
46+ src : "https://js.stripe.com/v3/"
47+ } ) ;
4548
4649 return (
4750 < Html lang = "en" >
You can’t perform that action at this time.
0 commit comments