Sfoglia il codice sorgente

Fix ypp for multiple channels #4110

WRadoslaw 1 anno fa
parent
commit
d1c5e69029

+ 4 - 8
packages/atlas/src/views/global/YppLandingView/YppAuthorizationModal/YppAuthorizationModal.tsx

@@ -383,7 +383,7 @@ export const YppAuthorizationModal: FC<YppAuthorizationModalProps> = ({
           description: `Select the ${APP_NAME} channel you want your YouTube channel to be connected with.`,
           primaryButton: {
             text: 'Authorize with YouTube',
-            onClick: () => handleAuthorizeClick,
+            onClick: () => handleAuthorizeClick(),
             disabled: !selectedChannel,
           },
           component: (
@@ -409,9 +409,7 @@ export const YppAuthorizationModal: FC<YppAuthorizationModalProps> = ({
           title: 'Details',
           description: 'Provide additional information to set up your program membership.',
           primaryButton: {
-            onClick: () => {
-              handleSubmitDetailsForm()
-            },
+            onClick: () => handleSubmitDetailsForm(),
             text: 'Continue',
           },
           component: <YppAuthorizationDetailsFormStep />,
@@ -421,9 +419,7 @@ export const YppAuthorizationModal: FC<YppAuthorizationModalProps> = ({
           title: 'YouTube Sync',
           description: `With YouTube Sync enabled, ${APP_NAME} will import videos from your YouTube channel over to Joystream. This can be changed later.`,
           primaryButton: {
-            onClick: () => {
-              handleSubmitDetailsForm()
-            },
+            onClick: () => handleSubmitDetailsForm(),
             text: 'Continue',
           },
           component: <YppAuthorizationSyncStep />,
@@ -462,7 +458,7 @@ export const YppAuthorizationModal: FC<YppAuthorizationModalProps> = ({
           title: 'Authorization failed',
           primaryButton: {
             text: 'Select another channel',
-            onClick: () => handleAuthorizeClick,
+            onClick: () => handleAuthorizeClick(),
           },
           description: (
             <>