Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fe): update copy, copy btn #7116

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo, useState } from 'react'
import { useParams } from 'react-router-dom'
import { Box, Center, Container } from '@chakra-ui/react'
import { Box, Center, Container, Flex, Stack, Text } from '@chakra-ui/react'
import { Elements, useStripe } from '@stripe/react-stripe-js'
import { loadStripe } from '@stripe/stripe-js'

Expand All @@ -11,6 +11,7 @@ import {
} from '~shared/types'

import InlineMessage from '~components/InlineMessage'
import { CopyButton } from '~templates/CopyButton'

import { useEnv } from '~features/env/queries'

Expand Down Expand Up @@ -155,9 +156,22 @@ const StripePaymentContainer = ({
<PaymentFormWrapper>
{secretEnv === 'production' ? null : (
<InlineMessage variant="warning" mb="1rem">
Use '4242 4242 4242 4242' as your card number to test payments
on this form. Payments made on this form will only show in
test mode in Stripe.
<Stack>
<Text>
Make a test payment with the card number below! Payments
made on this form will only show in test mode in Stripe.
</Text>
<Flex align="center">
<Text mr="0.25rem">4242 4242 4242 4242</Text>
<Flex boxSize="1.5rem" align="center" justify="center">
<CopyButton
colorScheme="secondary"
stringToCopy={`4242424242424242`}
aria-label="Copy test card number"
/>
</Flex>
</Flex>
</Stack>
</InlineMessage>
)}
<PaymentStack>
Expand Down
Loading