mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
* [WEB-1634] dev: update application router to support n-progress. * chore: update app router initilization logic. * fix: lint errors
11 lines
375 B
TypeScript
11 lines
375 B
TypeScript
import { useContext } from "react";
|
|
// store
|
|
import { StoreContext } from "@/lib/store-context";
|
|
import { IRouterStore } from "@/store/router.store";
|
|
|
|
export const useRouterParams = (): IRouterStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useRouterParams must be used within StoreProvider");
|
|
return context.router;
|
|
};
|