mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-14 18:54:46 +08:00
feat: add STATIC_WEBSITE_ONLY mode
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { env } from "~/env";
|
||||
|
||||
import { extractReplayIdFromSearchParams } from "./get-replay-id";
|
||||
|
||||
export function useReplay() {
|
||||
@@ -12,5 +14,8 @@ export function useReplay() {
|
||||
() => extractReplayIdFromSearchParams(searchParams.toString()),
|
||||
[searchParams],
|
||||
);
|
||||
return { isReplay: replayId != null, replayId };
|
||||
return {
|
||||
isReplay: replayId != null || env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY,
|
||||
replayId,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user