Skip to content

Commit

Permalink
Switched to vike v1 design
Browse files Browse the repository at this point in the history
- Seems to work pretty well
- Might need some added adjustment and testing

See migration guide at https://vike.dev/migration/v1-design
  • Loading branch information
davenquinn committed Jan 21, 2024
1 parent a8fd1b3 commit a38ad7a
Show file tree
Hide file tree
Showing 23 changed files with 11 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import hyper from "@macrostrat/hyper";
import { Breadcrumbs, HotkeysProvider } from "@blueprintjs/core";
import hyper from "@macrostrat/hyper";
import { ClientOnly } from "~/renderer/client-only";
import style from "./main.module.sass";
import style from "../main.module.sass";

const h = hyper.styled(style);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/renderer/+config.h.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Config } from "vike/types";

export default {
passToClient: ["pageProps", "urlPathname"],
} satisfies Config;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { render };
export { render as onRenderClient };

import { FocusStyleManager } from "@blueprintjs/core";
import { hydrateRoot } from "react-dom/client";
import { PageShell } from "./page-shell";
import type { PageContextClient } from "./types";
import { FocusStyleManager } from "@blueprintjs/core";

// This render() hook only supports SSR, see https://vike.dev/render-modes for how to modify render() to support SPA
async function render(pageContext: PageContextClient) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
export { render };
export { render as onRenderHtml };
// See https://vike.dev/data-fetching
export const passToClient = ["pageProps", "urlPathname"];

import ReactDOMServer from "react-dom/server";
import { dangerouslySkipEscape, escapeInject } from "vike/server";
import { PageShell } from "./page-shell";
import { escapeInject, dangerouslySkipEscape } from "vike/server";
import type { PageContextServer } from "./types";

async function render(pageContext: PageContextServer) {
Expand Down

0 comments on commit a38ad7a

Please sign in to comment.