import { RocketOutlined } from '@ant-design/icons' import { Button, Col, Form, Input, Layout, Row, Typography } from 'antd' import React from 'react' import { useEffect } from 'react' const Startup: React.FC = () => { const [form] = Form.useForm() useEffect(() => { form.setFieldsValue({ baseUrl: window.location.origin, apiUrl: localStorage.getItem('API_URL') || process.env.REACT_APP_API_URL || window.location.origin }) }, []) const finish = () => { let { baseUrl } = form.getFieldsValue() if (!/^http/.test(baseUrl)) { baseUrl = `https://${baseUrl}` } // if (!/^http/.test(apiUrl)) { // apiUrl = `https://${apiUrl}` // } localStorage.setItem('BASE_URL', baseUrl) // localStorage.setItem('API_URL', apiUrl) return window.location.replace(baseUrl) } return Welcome! We'll redirect you to your TeleDrive application.
{/* */}
} export default Startup