This commit is contained in:
ditiqi 2025-02-27 12:21:44 +08:00
parent e8df9c4cdd
commit 8728a76982
1 changed files with 13 additions and 2 deletions

View File

@ -1,7 +1,18 @@
import { ReactNode } from "react"; import { ReactNode, useEffect } from "react";
import FilterSection from "./FilterSection"; import FilterSection from "./FilterSection";
import { useMainContext } from "../MainProvider";
export function BasePostLayout({ children }: { children: ReactNode }) { export function BasePostLayout({
children,
showSearchMode = false,
}: {
children: ReactNode;
showSearchMode?: boolean;
}) {
const { setShowSearchMode } = useMainContext();
useEffect(() => {
setShowSearchMode(showSearchMode);
}, [showSearchMode]);
return ( return (
<> <>
<div className="min-h-screen bg-gray-50"> <div className="min-h-screen bg-gray-50">