From 5d1187bd8967e9990849b7fc21df62cbb81f35ed Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Tue, 13 Aug 2024 11:28:15 +0200 Subject: [PATCH] fix: fix JSDoc --- vike-solid/hooks/useConfig/useConfig-client.ts | 7 +------ vike-solid/hooks/useConfig/useConfig-server.ts | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/vike-solid/hooks/useConfig/useConfig-client.ts b/vike-solid/hooks/useConfig/useConfig-client.ts index 2c10aa0..fca9c64 100644 --- a/vike-solid/hooks/useConfig/useConfig-client.ts +++ b/vike-solid/hooks/useConfig/useConfig-client.ts @@ -6,17 +6,12 @@ import type { ConfigFromHook } from "../../types/Config.js"; import { usePageContext } from "../usePageContext.js"; import { getPageContext } from "vike/getPageContext"; -/** - * Set configurations inside React components and Vike hooks. - * - * https://vike.dev/useConfig - */ function useConfig(): (config: ConfigFromHook) => void { // Vike hook let pageContext = getPageContext() as PageContext & PageContextInternal; if (pageContext) return (config: ConfigFromHook) => setPageContextConfigFromHook(config, pageContext); - // React component + // Component pageContext = usePageContext(); return (config: ConfigFromHook) => { if (!("_headAlreadySet" in pageContext)) { diff --git a/vike-solid/hooks/useConfig/useConfig-server.ts b/vike-solid/hooks/useConfig/useConfig-server.ts index 27f064d..3d5bc29 100644 --- a/vike-solid/hooks/useConfig/useConfig-server.ts +++ b/vike-solid/hooks/useConfig/useConfig-server.ts @@ -10,7 +10,7 @@ import { objectKeys } from "../../utils/objectKeys.js"; import { includes } from "../../utils/includes.js"; /** - * Set configurations inside React components and Vike hooks. + * Set configurations inside components and Vike hooks. * * https://vike.dev/useConfig */ @@ -19,7 +19,7 @@ function useConfig(): (config: ConfigFromHook) => void { let pageContext = getPageContext() as PageContext & PageContextInternal; if (pageContext) return (config: ConfigFromHook) => setPageContextConfigFromHook(config, pageContext); - // React component + // Component pageContext = usePageContext(); return (config: ConfigFromHook) => { if (!pageContext._headAlreadySet) {