mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: add stripe integration (#1109)
* feat: add stripe integration * add start:demo yarn script
This commit is contained in:
		
							parent
							
								
									83d2bf50af
								
							
						
					
					
						commit
						9ca2b6fc46
					
				| @ -29,6 +29,7 @@ | ||||
|     "start": "vite", | ||||
|     "start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start", | ||||
|     "start:enterprise": "UNLEASH_API=https://unleash4.herokuapp.com yarn run start", | ||||
|     "start:demo": "UNLEASH_BASE_PATH=/demo/ yarn start", | ||||
|     "test": "vitest", | ||||
|     "prepare": "yarn run build", | ||||
|     "fmt": "prettier src --write --loglevel warn", | ||||
|  | ||||
| @ -1,20 +1,8 @@ | ||||
| import { Button, styled } from '@mui/material'; | ||||
| import { VFC } from 'react'; | ||||
| import { formatApiPath } from 'utils/formatPath'; | ||||
| 
 | ||||
| const href = `mailto:elise@getunleash.ai?subject=Continue with Unleash&body=Hi Unleash,%0D%0A%0D%0A
 | ||||
| I would like to continue with Unleash.%0D%0A%0D%0A%0D%0A%0D%0A | ||||
| 
 | ||||
| Billing information:%0D%0A%0D%0A | ||||
| 
 | ||||
| 1. Company name (legal name): [add your information here]%0D%0A%0D%0A | ||||
| 2. Email address (where we will send the invoice): [add your information here]%0D%0A%0D%0A | ||||
| 3. Address: [add your information here]%0D%0A%0D%0A | ||||
| 4. Country: [add your information here]%0D%0A%0D%0A | ||||
| 5. VAT ID (optional - only European countries): [add your information here]%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| -- Thank you for signing up. We will upgrade your trial as quick as possible and we will grant you access to the application again. --`;
 | ||||
| const PORTAL_URL = formatApiPath('api/admin/invoices'); | ||||
| 
 | ||||
| const StyledButton = styled(Button)(({ theme }) => ({ | ||||
|     width: '100%', | ||||
| @ -27,10 +15,11 @@ interface IBillingInformationButtonProps { | ||||
| 
 | ||||
| export const BillingInformationButton: VFC<IBillingInformationButtonProps> = ({ | ||||
|     update, | ||||
| }) => { | ||||
|     return ( | ||||
|         <StyledButton href={href} variant={update ? 'outlined' : 'contained'}> | ||||
|             {update ? 'Update billing information' : 'Add billing information'} | ||||
|         </StyledButton> | ||||
|     ); | ||||
| }; | ||||
| }) => ( | ||||
|     <StyledButton | ||||
|         href={`${PORTAL_URL}/${update ? 'portal' : 'checkout'}`} | ||||
|         variant={update ? 'outlined' : 'contained'} | ||||
|     > | ||||
|         {update ? 'Update billing information' : 'Add billing information'} | ||||
|     </StyledButton> | ||||
| ); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user