-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): broken search not seeing the basePath when calling the api
- Loading branch information
Showing
6 changed files
with
876 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use client"; | ||
|
||
import { RootProvider } from "fumadocs-ui/provider"; | ||
import type { ReactNode } from "react"; | ||
import SearchDialog from "@/components/search"; | ||
|
||
export function Provider({ children }: { children: ReactNode }) { | ||
return ( | ||
<RootProvider | ||
search={{ | ||
SearchDialog, | ||
}} | ||
> | ||
{children} | ||
</RootProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"use client"; | ||
import SearchDialog from "fumadocs-ui/components/dialog/search-default"; | ||
import type { SharedProps } from "fumadocs-ui/components/dialog/search"; | ||
|
||
export default function CustomSearchDialog(props: SharedProps) { | ||
// hardcoded api path in the search dialog does not sees next basePath | ||
return <SearchDialog api="/uwu/api/search" {...props} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.