-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): Fixed documentation homepage
- Loading branch information
1 parent
8b673b6
commit 4992a7c
Showing
3 changed files
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,44 @@ | ||
'use client'; | ||
|
||
import React, { useCallback, useEffect, useRef } from 'react'; | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
|
||
export default function InterfaceExample(): JSX.Element { | ||
const ref = useRef<HTMLIFrameElement>(null); | ||
|
||
const onLoad = useCallback(() => { | ||
ref.current?.classList.remove('opacity-0'); | ||
ref.current?.classList.remove('scale-90'); | ||
ref.current?.classList.add('opacity-90'); | ||
ref.current?.classList.add('scale-100'); | ||
}, []);; | ||
|
||
useEffect(() => { | ||
if (!ref.current) { | ||
return undefined; | ||
} | ||
import Screenshot from '@monetr/docs/assets/screenshot.png'; | ||
|
||
const current = ref.current; | ||
ref.current.addEventListener('load', onLoad); | ||
|
||
return () => { | ||
current.removeEventListener('load', onLoad); | ||
}; | ||
}); | ||
export default function InterfaceExample(): JSX.Element { | ||
// const ref = useRef<HTMLImageElement>(null); | ||
// | ||
// const onLoad = useCallback(() => { | ||
// ref.current?.classList.remove('opacity-0'); | ||
// ref.current?.classList.remove('scale-90'); | ||
// ref.current?.classList.add('opacity-90'); | ||
// ref.current?.classList.add('scale-100'); | ||
// }, []);; | ||
// | ||
// useEffect(() => { | ||
// if (!ref.current) { | ||
// return undefined; | ||
// } | ||
// | ||
// }); | ||
|
||
return ( | ||
<iframe | ||
ref={ ref } | ||
<Image | ||
title='monetr interface' | ||
alt='Screenshot of the monetr interface' | ||
loading='lazy' | ||
className='w-full h-full translate-x-0 translate-y-0 scale-90 delay-150 duration-500 ease-in-out rounded-2xl mt-8 shadow-2xl z-10 backdrop-blur-md bg-black/90 transition-all opacity-0 pointer-events-none select-none max-w-[1280px] max-h-[720px] aspect-video-vertical md:aspect-video' | ||
src='/_storybook/iframe.html?viewMode=story&id=new-ui--transactions&shortcuts=false&singleStory=true&args=' | ||
className='w-full h-full translate-x-0 translate-y-0 scale-100 delay-150 duration-500 ease-in-out rounded-2xl mt-8 shadow-2xl z-10 backdrop-blur-md bg-black/90 transition-all opacity-90 pointer-events-none select-none max-w-[1280px] max-h-[720px] aspect-video-vertical md:aspect-video' | ||
src={ Screenshot } | ||
/> | ||
); | ||
|
||
// return ( | ||
// <iframe | ||
// ref={ ref } | ||
// title='monetr interface' | ||
// loading='lazy' | ||
// className='w-full h-full translate-x-0 translate-y-0 scale-90 delay-150 duration-500 ease-in-out rounded-2xl mt-8 shadow-2xl z-10 backdrop-blur-md bg-black/90 transition-all opacity-0 pointer-events-none select-none max-w-[1280px] max-h-[720px] aspect-video-vertical md:aspect-video' | ||
// src='/_storybook/iframe.html?viewMode=story&id=new-ui--transactions&shortcuts=false&singleStory=true&args=' | ||
// /> | ||
// ); | ||
} |