diff --git a/apps/frontend/src/components/launches/add.provider.component.tsx b/apps/frontend/src/components/launches/add.provider.component.tsx
index a84c581c..cfaad232 100644
--- a/apps/frontend/src/components/launches/add.provider.component.tsx
+++ b/apps/frontend/src/components/launches/add.provider.component.tsx
@@ -256,6 +256,7 @@ export const CustomVariables: FC<{
onboarding?: boolean;
}> = (props) => {
const { close, gotoUrl, identifier, variables, onboarding } = props;
+ const fetch = useFetch();
const modals = useModals();
const schema = useMemo(() => {
return object({
@@ -291,9 +292,16 @@ export const CustomVariables: FC<{
});
const submit = useCallback(
async (data: FieldValues) => {
+ const { url } = await (
+ await fetch(
+ `/integrations/social/${identifier}${
+ onboarding ? '?onboarding=true' : ''
+ }`
+ )
+ ).json();
modals.closeAll();
gotoUrl(
- `/integrations/social/${identifier}?state=nostate&code=${Buffer.from(
+ `/integrations/social/${identifier}?state=${url}&code=${Buffer.from(
JSON.stringify(data)
).toString('base64')}${onboarding ? '&onboarding=true' : ''}`
);
@@ -474,22 +482,6 @@ export const AddProviderComponent: FC<{
[onboarding]
);
- const showApiButton = useCallback(
- (identifier: string, name: string) => async () => {
- modal.openModal({
- title: '',
- withCloseButton: true,
- classNames: {
- modal: 'bg-transparent text-textColor',
- },
- children: (
-