diff --git a/deno.jsonc b/deno.jsonc index f386bd2..8d6e48d 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "imports": { - "fullsoak": "jsr:@fullsoak/fullsoak@0.15.0", + "fullsoak": "jsr:@fullsoak/fullsoak@0.16.0-alpha.1", "preact": "npm:preact@10.26.4", "preact-iso": "npm:preact-iso@2.9.0", "@std/testing": "jsr:@std/testing@^1.0.9" diff --git a/deno.lock b/deno.lock index ad28805..5792b5d 100644 --- a/deno.lock +++ b/deno.lock @@ -2,7 +2,7 @@ "version": "4", "specifiers": { "jsr:@dklab/oak-routing-ctrl@~0.14.1": "0.14.1", - "jsr:@fullsoak/fullsoak@0.15.0": "0.15.0", + "jsr:@fullsoak/fullsoak@0.16.0-alpha.1": "0.16.0-alpha.1", "jsr:@oak/commons@1": "1.0.0", "jsr:@oak/oak@^17.1.4": "17.1.4", "jsr:@std/assert@1": "1.0.11", @@ -45,8 +45,8 @@ "npm:zod" ] }, - "@fullsoak/fullsoak@0.15.0": { - "integrity": "5958a767ac8a4f20e8007730b0ec9c5f81568738069fb33e19637131f5a304a4", + "@fullsoak/fullsoak@0.16.0-alpha.1": { + "integrity": "dd6aee8b8f93a16f3739f338d6910c964c79f5a0c27441acb7dcc88eaa194cfa", "dependencies": [ "jsr:@dklab/oak-routing-ctrl", "jsr:@oak/oak", @@ -266,7 +266,7 @@ }, "workspace": { "dependencies": [ - "jsr:@fullsoak/fullsoak@0.15.0", + "jsr:@fullsoak/fullsoak@0.16.0-alpha.1", "jsr:@std/testing@^1.0.9", "npm:preact-iso@2.9.0", "npm:preact@10.26.4" diff --git a/src/components/MyRouteAwareComponent/routes/Media/index.tsx b/src/components/MyRouteAwareComponent/routes/Media/index.tsx index f0bdfbc..9c61d94 100644 --- a/src/components/MyRouteAwareComponent/routes/Media/index.tsx +++ b/src/components/MyRouteAwareComponent/routes/Media/index.tsx @@ -2,13 +2,14 @@ import type { FunctionComponent } from "preact"; import type { RoutableProps } from "preact-iso"; type Props = RoutableProps & { - id?: string -} + id?: string; +}; export const Media: FunctionComponent = ({ id }) => { - - return
- {id &&

Showing media for id {id}

} - {!id && Please provide a source url to view its content} -
; -} + return ( +
+ {id &&

Showing media for id {id}

} + {!id && Please provide a source url to view its content} +
+ ); +}; diff --git a/src/main.ts b/src/main.ts index 3bf28e9..861cd94 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,6 +6,7 @@ import { ssr, useFullSoak, } from "fullsoak"; +import { byoHat } from "fullsoak/batteries"; import { MyComponent } from "./components/MyComponent/index.tsx"; import { MyRouteAwareComponent } from "./components/MyRouteAwareComponent/index.tsx"; @@ -25,7 +26,7 @@ class MyController { return ssr(MyRouteAwareComponent, { foo: "Lorem Ipsum", path: ctx.request.url.pathname, - }); + }, { headContent: byoHat({ title: "FullSoak App" }) }); } } diff --git a/tests/__snapshots__/MyComponent.test.ts.snap b/tests/__snapshots__/MyComponent.test.ts.snap index 4fe67f2..624fa9f 100644 --- a/tests/__snapshots__/MyComponent.test.ts.snap +++ b/tests/__snapshots__/MyComponent.test.ts.snap @@ -1,7 +1,7 @@ export const snapshot = {}; snapshot[`MyComponent 1`] = ` -'

MyComponent

MyOtherComponent

props 'baz' is 0
' + }

MyComponent

MyOtherComponent

props 'baz' is 0
' `; diff --git a/tests/__snapshots__/MyRouteAwareComponent.test.ts.snap b/tests/__snapshots__/MyRouteAwareComponent.test.ts.snap index cd0f162..30fc399 100644 --- a/tests/__snapshots__/MyRouteAwareComponent.test.ts.snap +++ b/tests/__snapshots__/MyRouteAwareComponent.test.ts.snap @@ -1,7 +1,7 @@ export const snapshot = {}; snapshot[`MyRouteAwareComponent 1`] = ` -'

NotFound

Back
' + }

NotFound

Back
' `;