Switch to vite and preact

This commit is contained in:
Misode
2021-06-23 20:44:28 +02:00
parent e551b7ef75
commit 09c851914f
89 changed files with 6398 additions and 15531 deletions

16
src/app/components/Ad.tsx Normal file
View File

@@ -0,0 +1,16 @@
import { useEffect } from 'preact/hooks'
declare const ethicalads: any
type AdProps = {
type: 'text' | 'image',
id: string,
}
export function Ad({ type, id }: AdProps) {
useEffect(() => {
document.getElementById('ad-placeholder')?.remove()
ethicalads?.load()
}, [])
return <div data-ea-publisher="misode-github-io" data-ea-type={type} class="ad dark flat" id={id}></div>
}