Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down
7 changes: 7 additions & 0 deletions src/components/Feedback/index.js
Original file line number Diff line number Diff line change
@@ -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 <BrowserOnly>{() => <FeedbackWidget />}</BrowserOnly>;
}

function FeedbackWidget() {
const [isVisible, setIsVisible] = useState(() => {
// 1. Initialize state synchronously from localStorage to prevent flicker.
if (typeof window === "undefined") {
Expand Down
Loading