Skip to content

Commit

Permalink
Update passport demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ardier16 committed Jun 17, 2024
1 parent 16d46e5 commit 5587914
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 13 deletions.
Binary file modified public/images/home/demo-mockup-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/home/demo-mockup-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/home/demo-mockup-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/home/demo-mockup-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/home/demo-mockup-5.png
Binary file not shown.
4 changes: 2 additions & 2 deletions src/app/components/AirdropCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function AirdropCard() {
it can be used by projects and organizations to directly reach
civilians
</p>
<div className='mt-2 flex items-center gap-10 lg:mt-4'>
<p className='text-body2 opacity-50'>Distributing:</p>
<div className='mt-2 flex items-center gap-4 lg:mt-4 lg:gap-10'>
<p className='text-body3 opacity-50 lg:text-body2'>Distributing:</p>
<img
src='/images/home/glo-dollar-logo.svg'
alt='Glo Dollar'
Expand Down
15 changes: 5 additions & 10 deletions src/app/components/PassportDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,24 @@ import { cn } from '@/theme/utils'
const steps = [
{
title:
'You get rewards for using the app and identity proofs across different ecosystems',
'To create an incognito profile, users should scan their biometric passport',
image: '/images/home/demo-mockup-1.png',
},
{
title:
'[Step 2] You get rewards for using the app and identity proofs across different ecosystems',
'The application will initially support a set of countries and, over time, will include other passports on the waitlist',
image: '/images/home/demo-mockup-2.png',
},
{
title:
'[Step 3] You get rewards for using the app and identity proofs across different ecosystems',
'The biggest innovation is that users self-issue digital passports, ensuring personal data never leaves their device',
image: '/images/home/demo-mockup-3.png',
},
{
title:
'[Step 4] You get rewards for using the app and identity proofs across different ecosystems',
'The incognito profile enables users to prove their eligibility and belonging and use country-specific mini-apps',
image: '/images/home/demo-mockup-4.png',
},
{
title:
'[Step 5] You get rewards for using the app and identity proofs across different ecosystems',
image: '/images/home/demo-mockup-5.png',
},
]

export default function PassportDemo({ isOpen }: { isOpen: boolean }) {
Expand Down Expand Up @@ -66,7 +61,7 @@ export default function PassportDemo({ isOpen }: { isOpen: boolean }) {
<p className='text-subtitle4 text-text-secondary lg:text-subtitle3'>
Step {index + 1}/{steps.length}
</p>
<p className='text-subtitle2 text-text-primary lg:text-subtitle1'>
<p className='text-subtitle3 text-text-primary lg:text-subtitle2'>
{title}
</p>
</div>
Expand Down
23 changes: 22 additions & 1 deletion src/ui/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client'
import { HTMLAttributes } from 'react'
import { HTMLAttributes, useCallback, useEffect } from 'react'
import { createPortal } from 'react-dom'

import CloseIcon from '@/assets/icons/close-icon.svg'
Expand All @@ -12,6 +12,27 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
}

export default function Modal({ isOpen, onClose, children, ...rest }: Props) {
const handleKeyDown = useCallback(
(e: KeyboardEvent) => {
if (e.key === 'Escape') {
onClose()
}
},
[onClose],
)

useEffect(() => {
if (isOpen) {
document.addEventListener('keydown', handleKeyDown)
} else {
document.removeEventListener('keydown', handleKeyDown)
}

return () => {
document.removeEventListener('keydown', handleKeyDown)
}
}, [isOpen, handleKeyDown])

return (
<ClientOnly>
{() =>
Expand Down

0 comments on commit 5587914

Please sign in to comment.