mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fix table name not in tab name
This commit is contained in:
@@ -15,6 +15,7 @@ import TableSkeleton from "@src/components/Table/TableSkeleton";
|
||||
|
||||
import {
|
||||
projectScope,
|
||||
projectIdAtom,
|
||||
currentUserAtom,
|
||||
projectSettingsAtom,
|
||||
tablesAtom,
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
tableIdAtom,
|
||||
tableSettingsAtom,
|
||||
} from "@src/atoms/tableScope";
|
||||
import useDocumentTitle from "@src/hooks/useDocumentTitle";
|
||||
|
||||
/**
|
||||
* Wraps `TablePage` with the data for a top-level table.
|
||||
@@ -32,11 +34,14 @@ import {
|
||||
export default function ProvidedTablePage() {
|
||||
const { id } = useParams();
|
||||
const outlet = useOutlet();
|
||||
const [projectId] = useAtom(projectIdAtom, projectScope);
|
||||
const [currentUser] = useAtom(currentUserAtom, projectScope);
|
||||
const [projectSettings] = useAtom(projectSettingsAtom, projectScope);
|
||||
const [tables] = useAtom(tablesAtom, projectScope);
|
||||
|
||||
const tableSettings = useMemo(() => find(tables, ["id", id]), [tables, id]);
|
||||
useDocumentTitle(projectId, tableSettings ? tableSettings.name : "Not found");
|
||||
|
||||
if (!tableSettings) {
|
||||
if (isEmpty(projectSettings)) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user