2023-08-11 11:48:33 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import { useEffect } from "react";
|
2023-09-01 11:12:30 +00:00
|
|
|
// next imports
|
|
|
|
import { useRouter } from "next/router";
|
2023-08-11 11:48:33 +00:00
|
|
|
// mobx store
|
|
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
|
|
import { RootStore } from "store/root";
|
|
|
|
|
|
|
|
const MobxStoreInit = () => {
|
|
|
|
const store: RootStore = useMobxStore();
|
|
|
|
|
2023-09-01 11:12:30 +00:00
|
|
|
const router = useRouter();
|
|
|
|
const { states, labels, priorities } = router.query as { states: string[]; labels: string[]; priorities: string[] };
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
// store.issue.userSelectedLabels = labels || [];
|
|
|
|
// store.issue.userSelectedPriorities = priorities || [];
|
|
|
|
// store.issue.userSelectedStates = states || [];
|
|
|
|
// }, [store.issue]);
|
2023-08-11 11:48:33 +00:00
|
|
|
|
|
|
|
return <></>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default MobxStoreInit;
|