node server + separate client folder

This commit is contained in:
cv
2021-04-05 22:33:31 +02:00
parent d0c8567022
commit c39f3f2dde
56 changed files with 724 additions and 6 deletions
@@ -0,0 +1,30 @@
import { AspectRatio } from '@chakra-ui/layout';
import { CircularProgress } from '@chakra-ui/progress';
import { useState } from 'react';
import style from './IFrameLoader.module.css';
export default function IFrameLoader(props) {
const [loading, setLoading] = useState(true);
const { title, src } = props;
return (
<AspectRatio maxW='300' ratio={16 / 9} className={style.iframeContainer}>
<>
{loading && (
<CircularProgress
className={style.loader}
isIndeterminate
color='orange.300'
trackColor='#FFF0'
/>
)}
<iframe
className={style.iframe}
title={title}
src={src}
onLoad={() => setLoading(false)}
/>
</>
</AspectRatio>
);
}