diff --git a/docusaurus.config.js b/docusaurus.config.js index 84ce68733..fe7a6f6e8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -69,12 +69,10 @@ const config = { route: "/weaviate/api/rest", cdn: "https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.49.0", configuration: { - spec: { - // The committed copy is the single source of truth: this page and - // /openapi.json render the same file. Do not point this back at a - // raw.githubusercontent branch URL — see static/specs/README.md. - url: "/specs/weaviate-openapi.json", - }, + // The committed copy is the single source of truth: this page and + // /openapi.json render the same file. Do not point this back at a + // raw.githubusercontent branch URL — see static/specs/README.md. + url: "/specs/weaviate-openapi.json", hideModels: true, showSidebar: true, }, @@ -88,9 +86,7 @@ const config = { route: "/engram/api/rest", cdn: "https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.49.0", configuration: { - spec: { - url: "/specs/engram-openapi.json", - }, + url: "/specs/engram-openapi.json", hideModels: true, showSidebar: true, }, diff --git a/src/components/Feedback/index.js b/src/components/Feedback/index.js index 0a5aced8b..6d02b2bea 100644 --- a/src/components/Feedback/index.js +++ b/src/components/Feedback/index.js @@ -1,7 +1,14 @@ import React, { useState, useEffect } from "react"; +import BrowserOnly from "@docusaurus/BrowserOnly"; import styles from "./styles.module.scss"; export default function FeedbackComponent() { + // Render only after hydration: the initial state reads localStorage, which + // the server can't, so an earlier render would not match the server HTML. + return {() => }; +} + +function FeedbackWidget() { const [isVisible, setIsVisible] = useState(() => { // 1. Initialize state synchronously from localStorage to prevent flicker. if (typeof window === "undefined") {