start over with nextjs

This commit is contained in:
Thomas Ruoff
2021-02-25 00:31:28 +01:00
parent 3a77e7f22b
commit 214d95d3d7
68 changed files with 3047 additions and 18576 deletions

37
components/Preview.tsx Normal file
View File

@@ -0,0 +1,37 @@
import React from 'react';
export default props => {
if (props.pdfIsLoading) {
return (
<div>Lade&hellip;</div>
);
}
const errorStyles = {
padding: '6px 12px',
color: 'white',
backgroundColor: '#d81e1e',
borderRadius: '3px',
};
if (props.pdfError) {
return (
<div style={errorStyles}><span role="img" aria-label="Crying Man">😢</span> {props.pdfError}</div>
);
}
if (!props.pdfUrl) {
return (
<div>Knopf drücken dann gibts hier was zu sehen!</div>
);
}
const styles = {
width: '700px',
height: '1050px'
};
return (
<embed src={props.pdfUrl} style={styles} type="application/pdf" />
);
};