Skip to content

Commit

Permalink
feat(proof): fadein image (#2617)
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans authored and isaozler committed Nov 28, 2024
1 parent 33f7aa0 commit 840e2d9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .changeset/seven-shrimps-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,20 @@ export const AttendanceTicket: FC<IProps> = ({ data, share }) => {
<Stack
className={classNames(wrapperClass, { [shareWrapperClass]: share })}
>
<motion.div
layoutId={data.image}
className={shareClass}
style={{
backgroundImage: `url("${getIPFSLink(data.image)}")`,
backgroundColor: data.properties?.avatar?.backgroundColor,
aspectRatio: aspectRatio,
}}
></motion.div>
{imgWidth && (
<motion.div
layoutId={data.image}
transition={{ delay: 1, duration: 0.5 }}
initial={{ opacity: 0, y: '-20%' }}
animate={{ opacity: 1, y: 0 }}
className={shareClass}
style={{
backgroundImage: `url("${getIPFSLink(data.image)}")`,
backgroundColor: data.properties?.avatar?.backgroundColor,
aspectRatio: aspectRatio,
}}
></motion.div>
)}
<div className={gradientClass}></div>
</Stack>
);
Expand All @@ -78,6 +83,9 @@ export const AttendanceTicket: FC<IProps> = ({ data, share }) => {
<motion.div
layoutId={data.image}
className={ticketClass}
transition={{ delay: 1, duration: 0.5 }}
initial={{ opacity: 0, y: '-20%' }}
animate={{ opacity: 1, y: 0 }}
style={{
backgroundImage: `url("${getIPFSLink(data.image)}")`,
backgroundColor: data.properties?.avatar?.backgroundColor,
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/proof-of-us/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const MyApp = ({
</Head>
<main className={mainWrapperClass}>
<CookieConsent />
<AnimatePresence mode="popLayout" initial={false}>
<AnimatePresence mode="popLayout">
<Component {...pageProps} key={router.asPath} />
</AnimatePresence>
</main>
Expand Down

0 comments on commit 840e2d9

Please sign in to comment.