Rename console core & create dedicated relay env providers

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-20 22:11:45 +01:00
committed by Bryan Frimin
parent c2a5197459
commit e5c2ce0337
22 changed files with 585 additions and 327 deletions

View File

@@ -1,19 +1,25 @@
import { lazy } from "@probo/react-lazy";
import { PageSkeleton } from "/components/skeletons/PageSkeleton";
import { loadQuery } from "react-relay";
import { consoleEnvironment } from "/environments";
import { coreEnvironment } from "/environments";
import { tasksQuery } from "/hooks/graph/TaskGraph";
import { loaderFromQueryLoader, withQueryRef, type AppRoute } from "@probo/routes";
import {
loaderFromQueryLoader,
withQueryRef,
type AppRoute,
} from "@probo/routes";
import type { TaskGraphQuery } from "/hooks/graph/__generated__/TaskGraphQuery.graphql";
export const taskRoutes = [
{
path: "tasks",
Fallback: PageSkeleton,
loader: loaderFromQueryLoader(({ organizationId }) =>
loadQuery<TaskGraphQuery>(consoleEnvironment, tasksQuery, {
loadQuery<TaskGraphQuery>(coreEnvironment, tasksQuery, {
organizationId,
}),
),
Component: withQueryRef(lazy(() => import("/pages/organizations/tasks/TasksPage"))),
Component: withQueryRef(
lazy(() => import("/pages/organizations/tasks/TasksPage")),
),
},
] satisfies AppRoute[];