Change payment method order & add new asso link

This commit is contained in:
2022-07-18 01:14:28 +04:00
parent e1b9e0a8d6
commit 117e81b5cb
2 changed files with 31 additions and 24 deletions
+22 -22
View File
@@ -79,12 +79,31 @@ export default function PaymentMethod({isLoading, paymentMethod, setPaymentMetho
<Box sx={{width: '100%'}}> <Box sx={{width: '100%'}}>
<Box sx={{borderBottom: 1, borderColor: 'divider'}}> <Box sx={{borderBottom: 1, borderColor: 'divider'}}>
<Tabs scrollButtons allowScrollButtonsMobile value={paymentMethod} aria-label='basic tabs example' variant='fullWidth' onChange={handleChange}> <Tabs scrollButtons allowScrollButtonsMobile value={paymentMethod} aria-label='basic tabs example' variant='fullWidth' onChange={handleChange}>
<Tab wrapped label='Carte bancaire' {...a11yProps(0)} /> <Tab wrapped label='Adhésion' {...a11yProps(0)} />
<Tab wrapped label='PayPal / Liberapay' {...a11yProps(1)} /> <Tab wrapped label='PayPal / Liberapay' {...a11yProps(1)} />
<Tab wrapped label='Adhésion' {...a11yProps(2)} /> <Tab wrapped label='Carte bancaire' {...a11yProps(2)} />
</Tabs> </Tabs>
</Box> </Box>
<TabPanel value={paymentMethod} index={0}> <TabPanel value={paymentMethod} index={0}>
<Button size='large' variant='outlined' onClick={() => window.open('https://asso.oki.re/public/members/new.php', '_blank')}>
Cliquez ici pour adhérer à lassociation OKi
</Button>
</TabPanel>
<TabPanel value={paymentMethod} index={1}>
<Grid container rowSpacing={1}>
<Grid item md={6} xs={12}>
<Button variant='outlined' size='large' endIcon={<Liberapay />} onClick={() => window.open(`https://liberapay.com/${LIBERAPAY_DONATE}/donate`, '_blank')}>
Faire un don via Liberapay
</Button>
</Grid>
<Grid item md={6} xs={12}>
<Button variant='outlined' size='large' endIcon={<Paypal />} onClick={() => window.open(`https://www.paypal.com/donate/?hosted_button_id=${PAYPAL_ID}`, '_blank')}>
Faire un don via PayPal
</Button>
</Grid>
</Grid>
</TabPanel>
<TabPanel value={paymentMethod} index={2}>
<Button size='large' variant='outlined' onClick={handleClickOpen}> <Button size='large' variant='outlined' onClick={handleClickOpen}>
Faire un don par carte bancaire Faire un don par carte bancaire
</Button> </Button>
@@ -106,7 +125,7 @@ export default function PaymentMethod({isLoading, paymentMethod, setPaymentMetho
setError={setError} setError={setError}
isLoading={isLoading} isLoading={isLoading}
> >
{clientSecret && validMontant && paymentMethod === 0 && ( {clientSecret && validMontant && paymentMethod === 2 && (
<Elements options={options} stripe={stripePromise}> <Elements options={options} stripe={stripePromise}>
<CheckoutForm <CheckoutForm
prices={prices} prices={prices}
@@ -119,25 +138,6 @@ export default function PaymentMethod({isLoading, paymentMethod, setPaymentMetho
)} )}
</StripeDialog> </StripeDialog>
</TabPanel> </TabPanel>
<TabPanel value={paymentMethod} index={1}>
<Grid container rowSpacing={1}>
<Grid item md={6} xs={12}>
<Button variant='outlined' size='large' endIcon={<Paypal />} onClick={() => window.open(`https://www.paypal.com/donate/?hosted_button_id=${PAYPAL_ID}`, '_blank')}>
Faire un don via PayPal
</Button>
</Grid>
<Grid item md={6} xs={12}>
<Button variant='outlined' size='large' endIcon={<Liberapay />} onClick={() => window.open(`https://liberapay.com/${LIBERAPAY_DONATE}/donate`, '_blank')}>
Faire un don via Liberapay
</Button>
</Grid>
</Grid>
</TabPanel>
<TabPanel value={paymentMethod} index={2}>
<Button size='large' variant='outlined' onClick={() => window.open('https://www.helloasso.com/associations/organisation-ka-internationale/adhesions/adhesion-oki', '_blank')}>
Cliquez ici pour adhérer à #OKi via HelloAsso
</Button>
</TabPanel>
</Box> </Box>
) )
} }
+9 -2
View File
@@ -70,9 +70,16 @@ export default function Home({errorCode, errorMessage, stats}) {
</Typography> </Typography>
</Container> </Container>
<Container align='center'> <Container align='center'>
<Button variant='outlined' size='large' onClick={() => window.open('https://o-k-i.net', '_blank')}> <Box sx={{marginBottom: 2}}>
<strong>Fédiverse o-k-i.net</strong> <OpenInNewIcon fontSize='small' /> <Button variant='outlined' onClick={() => window.open('https://asso.oki.re/public/members/new.php', '_blank')}>
<strong>Adhérez à lassociation #OKi</strong> <OpenInNewIcon fontSize='small' />
</Button> </Button>
</Box>
<Box>
<Button variant='outlined' onClick={() => window.open('https://o-k-i.net', '_blank')}>
<strong>#OKi sur le Fédiverse o-k-i.net</strong> <OpenInNewIcon fontSize='small' />
</Button>
</Box>
</Container> </Container>
</Box> </Box>
<Container sx={{flexGrow: 100}}> <Container sx={{flexGrow: 100}}>