mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
separate TablePage into its own chunk
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Suspense, useMemo } from "react";
|
||||
import { lazy, Suspense, useMemo } from "react";
|
||||
import { useAtom, Provider } from "jotai";
|
||||
import { selectAtom } from "jotai/utils";
|
||||
import { DebugAtoms } from "@src/atoms/utils";
|
||||
@@ -10,7 +10,6 @@ import Modal from "@src/components/Modal";
|
||||
import BreadcrumbsSubTable from "@src/components/Table/BreadcrumbsSubTable";
|
||||
import ErrorFallback from "@src/components/ErrorFallback";
|
||||
import TableSourceFirestore from "@src/sources/TableSourceFirestore";
|
||||
import TablePage from "./TablePage";
|
||||
import TableToolbarSkeleton from "@src/components/TableToolbar/TableToolbarSkeleton";
|
||||
import TableSkeleton from "@src/components/Table/TableSkeleton";
|
||||
|
||||
@@ -25,6 +24,9 @@ import { ROUTES } from "@src/constants/routes";
|
||||
import { TOP_BAR_HEIGHT } from "@src/layouts/Navigation/TopBar";
|
||||
import { TABLE_TOOLBAR_HEIGHT } from "@src/components/TableToolbar";
|
||||
|
||||
// prettier-ignore
|
||||
const TablePage = lazy(() => import("./TablePage" /* webpackChunkName: "TablePage" */));
|
||||
|
||||
/**
|
||||
* Wraps `TablePage` with the data for a top-level table.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Suspense } from "react";
|
||||
import { lazy, Suspense } from "react";
|
||||
import { useAtom, Provider } from "jotai";
|
||||
import { DebugAtoms } from "@src/atoms/utils";
|
||||
import { useParams, useOutlet } from "react-router-dom";
|
||||
@@ -9,7 +9,6 @@ import ErrorFallback, {
|
||||
ERROR_TABLE_NOT_FOUND,
|
||||
} from "@src/components/ErrorFallback";
|
||||
import TableSourceFirestore from "@src/sources/TableSourceFirestore";
|
||||
import TablePage from "./TablePage";
|
||||
import TableToolbarSkeleton from "@src/components/TableToolbar/TableToolbarSkeleton";
|
||||
import TableSkeleton from "@src/components/Table/TableSkeleton";
|
||||
|
||||
@@ -28,6 +27,9 @@ import {
|
||||
import { SyncAtomValue } from "@src/atoms/utils";
|
||||
import useDocumentTitle from "@src/hooks/useDocumentTitle";
|
||||
|
||||
// prettier-ignore
|
||||
const TablePage = lazy(() => import("./TablePage" /* webpackChunkName: "TablePage" */));
|
||||
|
||||
/**
|
||||
* Wraps `TablePage` with the data for a top-level table.
|
||||
* `SubTablePage` is inserted in the outlet, alongside `TablePage`.
|
||||
|
||||
Reference in New Issue
Block a user