fix: incorrect snapshot path with non-standard src directory (#1768)

This commit is contained in:
jia wei
2023-09-13 13:36:05 +02:00
committed by GitHub
parent e01ef2d8a0
commit 42dc54500c
9 changed files with 115 additions and 8 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>
);
}