Merge "Context" and "ContextProvider" components

This commit is contained in:
schroda
2025-08-16 02:14:49 +02:00
parent f548ba9502
commit f4c06d474d
65 changed files with 290 additions and 422 deletions

View File

@@ -7,7 +7,14 @@
*/
import { createContext, useContext } from 'react';
import { useHistory } from '@/features/core/hooks/useHistory.ts';
export const AppPageHistoryContext = createContext<string[]>([]);
export const useAppPageHistoryContext = () => useContext(AppPageHistoryContext);
export const AppPageHistoryContextProvider = ({ children }: { children: React.ReactNode }) => {
const history = useHistory();
return <AppPageHistoryContext.Provider value={history}>{children}</AppPageHistoryContext.Provider>;
};