mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-26 01:17:00 +02: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": "vite",
|
||||||
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start",
|
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start",
|
||||||
"start:enterprise": "UNLEASH_API=https://unleash4.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",
|
"test": "vitest",
|
||||||
"prepare": "yarn run build",
|
"prepare": "yarn run build",
|
||||||
"fmt": "prettier src --write --loglevel warn",
|
"fmt": "prettier src --write --loglevel warn",
|
||||||
|
@ -1,20 +1,8 @@
|
|||||||
import { Button, styled } from '@mui/material';
|
import { Button, styled } from '@mui/material';
|
||||||
import { VFC } from 'react';
|
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
|
const PORTAL_URL = formatApiPath('api/admin/invoices');
|
||||||
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 StyledButton = styled(Button)(({ theme }) => ({
|
const StyledButton = styled(Button)(({ theme }) => ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@ -27,10 +15,11 @@ interface IBillingInformationButtonProps {
|
|||||||
|
|
||||||
export const BillingInformationButton: VFC<IBillingInformationButtonProps> = ({
|
export const BillingInformationButton: VFC<IBillingInformationButtonProps> = ({
|
||||||
update,
|
update,
|
||||||
}) => {
|
}) => (
|
||||||
return (
|
<StyledButton
|
||||||
<StyledButton href={href} variant={update ? 'outlined' : 'contained'}>
|
href={`${PORTAL_URL}/${update ? 'portal' : 'checkout'}`}
|
||||||
{update ? 'Update billing information' : 'Add billing information'}
|
variant={update ? 'outlined' : 'contained'}
|
||||||
</StyledButton>
|
>
|
||||||
);
|
{update ? 'Update billing information' : 'Add billing information'}
|
||||||
};
|
</StyledButton>
|
||||||
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user