undefined
App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { useState } from 'react';import * as htmltoimage from 'html-to-image';
import reactLogo from './assets/react.svg';
import viteLogo from '/vite.svg';
import { WavyBackground } from './components/wavy-background';import './App.css';
window.addEventListener('message', async ({ data }) => { if (data.type === 'screenshot') {const screenshot = await htmltoimage.toJpeg(document.body);
parent.postMessage(
{type: 'screenshot-ready',
screenshot
},
'http://localhost:5173'
);
}
});
function App() {return (
<WavyBackground className="max-w-4xl mx-auto pb-40">
<p className="text-2xl md:text-4xl lg:text-7xl text-white font-bold inter-var text-center">
Hero waves are cool
</p>
<p className="text-base md:text-lg mt-4 text-white font-normal inter-var text-center">
Leverage the power of canvas to create a beautiful hero section
</p>
</WavyBackground>
)
}
export default App
initialising