import React, { useEffect } from 'react'; import styled from 'styled-components'; import Head from 'next/head'; import Me from '../components/Me'; import Social from '../components/Social'; const Canvas = styled.canvas` position: fixed; top: 0; left: 0; widht: 100%; height: 100%; z-index: -1; `; const Frontpage: React.FC<{}> = () => { useEffect(() => { const run = async () => { const { default: Particles } = await import('particlesjs'); Particles.init({ selector: '.background', connectParticles: true, color: '#dddddd', maxParticles: 200, }); console.log(Particles); }; run(); }); return ( <>