mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 06:42:06 +10:00
sync
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import React, { useEffect, useMemo } from "react";
|
||||
import {
|
||||
ActionIcon,
|
||||
Affix,
|
||||
AppShell,
|
||||
Button,
|
||||
Group,
|
||||
ScrollArea,
|
||||
Tooltip,
|
||||
@ -61,16 +59,18 @@ export default function ShareShell({
|
||||
const { shareId } = useParams();
|
||||
const { data } = useGetSharedPageTreeQuery(shareId);
|
||||
const readOnlyEditor = useAtomValue(readOnlyEditorAtom);
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
const setSharedPageTree = useSetAtom(sharedPageTreeAtom);
|
||||
// @ts-ignore
|
||||
const setSharedTreeData = useSetAtom(sharedTreeDataAtom);
|
||||
|
||||
|
||||
// Build and set the tree data when it changes
|
||||
const treeData = useMemo(() => {
|
||||
if (!data?.pageTree) return null;
|
||||
return buildSharedPageTree(data.pageTree);
|
||||
}, [data?.pageTree]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setSharedPageTree(data || null);
|
||||
setSharedTreeData(treeData);
|
||||
|
||||
@ -10,6 +10,6 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.alterTable('auth_providers')
|
||||
.dropColumn('group_sync')// enable_group_sync
|
||||
.dropColumn('group_sync')
|
||||
.execute();
|
||||
}
|
||||
|
||||
Submodule apps/server/src/ee updated: 27c23e94fc...10519eeaa2
Reference in New Issue
Block a user