This commit is contained in:
Philipinho
2025-08-31 12:32:47 -07:00
3 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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();
}