~timharek/timharek.no

5efca60e0f4529b6c6a4d66b539a29399178b42b — Tim Hårek Andreassen 2 months ago 8cbc2aa
chore: Remove unused code

Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2 files changed, 1 insertions(+), 21 deletions(-)

M fresh.gen.ts
D islands/Counter.tsx
M fresh.gen.ts => fresh.gen.ts +1 -4
@@ 25,7 25,6 @@ import * as $19 from "./routes/stats.tsx";
import * as $20 from "./routes/tags/[slug].tsx";
import * as $21 from "./routes/tags/index.tsx";
import * as $22 from "./routes/work.tsx";
import * as $$0 from "./islands/Counter.tsx";

const manifest = {
  routes: {


@@ 53,9 52,7 @@ const manifest = {
    "./routes/tags/index.tsx": $21,
    "./routes/work.tsx": $22,
  },
  islands: {
    "./islands/Counter.tsx": $$0,
  },
  islands: {},
  baseUrl: import.meta.url,
};


D islands/Counter.tsx => islands/Counter.tsx +0 -17
@@ 1,17 0,0 @@
import { useState } from "preact/hooks";
import { Button } from "../components/Button.tsx";

interface CounterProps {
  start: number;
}

export default function Counter(props: CounterProps) {
  const [count, setCount] = useState(props.start);
  return (
    <div class="flex gap-2 w-full">
      <p class="flex-grow-1 font-bold text-xl">{count}</p>
      <Button onClick={() => setCount(count - 1)}>-1</Button>
      <Button onClick={() => setCount(count + 1)}>+1</Button>
    </div>
  );
}