fix(server): properly sanitize island names (#1393)

Co-authored-by: Lino Le Van <11367844+lino-levan@users.noreply.github.com>
This commit is contained in:
Reed von Redwitz
2023-07-03 02:08:47 +02:00
committed by GitHub
co-authored by Lino Le Van
parent ced2215446
commit eb53d53ab8
5 changed files with 31 additions and 4 deletions
@@ -0,0 +1,22 @@
import type { Signal } from "@preact/signals";
import { IS_BROWSER } from "$fresh/runtime.ts";
interface CounterProps {
count: Signal<number>;
id: string;
}
export default function Counter(props: CounterProps) {
return (
<div id={props.id}>
<p>{props.count}</p>
<button
id={`b-${props.id}`}
onClick={() => props.count.value += 1}
disabled={!IS_BROWSER}
>
+1
</button>
</div>
);
}