continue re-design

This commit is contained in:
Developers Digest
2025-09-05 13:06:17 -04:00
parent b96d048dbd
commit 836b085f75
270 changed files with 32269 additions and 5182 deletions
@@ -0,0 +1,33 @@
"use client";
import React, { createContext, useContext, ReactNode } from "react";
type SearchParamsContextType = { [key: string]: string | string[] | undefined };
const SearchParamsContext = createContext<SearchParamsContextType | null>(null);
export const SearchParamsProvider = ({
children,
params,
}: {
children: ReactNode;
params: SearchParamsContextType;
}) => {
return (
<SearchParamsContext.Provider value={params}>
{children}
</SearchParamsContext.Provider>
);
};
export const useSearchParamsContext = () => {
const context = useContext(SearchParamsContext);
if (!context) {
throw new Error(
"useSearchParamsContext must be used within a SearchParamsProvider",
);
}
return context;
};