Make ContactBanner useable outside of MultiStepForm context

This commit is contained in:
Gary Tou 2025-03-07 17:23:41 -08:00
parent 97a17ecff2
commit 414b0847fd
No known key found for this signature in database
GPG key ID: 1587ABD3593755C3

View file

@ -7,13 +7,13 @@ const phoneNumberUri = '+1-844-237-2290'
const email = 'hcb@hackclub.com'
export default function ContactBanner({ sx }) {
const { step } = useMultiStepContext()
const firstStep = step === 0
const stepContext = useMultiStepContext()
const firstStep = stepContext?.step === 0
return (
<Flex
sx={{
display: firstStep ? 'block' : ['none', 'block'],
display: firstStep ? 'flex' : ['none', 'flex'],
bg: 'sunken',
color: 'slate',
alignItems: 'center',