import { useEffect } from "react";
import BasePostLayout from "../layout/BasePost/BasePostLayout";
import SearchListContainer from "./components/SearchContainer";
import { useMainContext } from "../layout/MainProvider";

export default function SearchPage() {
	const { setShowSearchMode, setSearchValue } = useMainContext();
	useEffect(() => {
		setShowSearchMode(true);
		return () => {
			setShowSearchMode(false);
			setSearchValue("");
		};
	}, [setShowSearchMode]);
	return (
		<BasePostLayout>
			<SearchListContainer></SearchListContainer>
		</BasePostLayout>
	);
}
