Skip to content

Commit

Permalink
Make the URL dynamic in salesforce form
Browse files Browse the repository at this point in the history
  • Loading branch information
parthy007 committed May 8, 2024
1 parent c19f4c7 commit 62fa0fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/_components/Salesforce.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import { toast } from 'react-hot-toast';
import Button from '@/_ui/Button';
import Select from '@/_ui/Select';
import Input from '@/_ui/Input';
import config from 'config';

const Salesforce = ({ optionchanged, createDataSource, options, isSaving, selectedDataSource, workspaceConstants }) => {
const [authStatus, setAuthStatus] = useState(null);
const { t } = useTranslation();
const redirectUri = `http://localhost:8082/oauth2/authorize`;
const hostUrl = window.public_config?.TOOLJET_HOST;
const subPathUrl = window.public_config?.SUB_PATH;
const fullUrl = `${hostUrl}${subPathUrl ? subPathUrl : '/'}oauth2/authorize`;
const redirectUri = fullUrl;
const selectOptions = [
{ value: 'v1', label: 'v1' },
{ value: 'v2', label: 'v2' },
Expand Down

0 comments on commit 62fa0fa

Please sign in to comment.