mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 17:39:55 +08:00
Merge branch 'feat/cloud-sync-saika' into feat/datacenter-dev
This commit is contained in:
@@ -3,6 +3,7 @@ import { useAppState } from '@/providers/app-state-provider';
|
||||
import type { NextPageWithLayout } from '../..//_app';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useRouter } from 'next/router';
|
||||
const DynamicBlocksuite = dynamic(() => import('@/components/editor'), {
|
||||
ssr: false,
|
||||
});
|
||||
@@ -11,7 +12,14 @@ const Page: NextPageWithLayout = () => {
|
||||
const [page, setPage] = useState(null);
|
||||
const { dataCenter } = useAppState();
|
||||
console.log('dataCenter: ', dataCenter);
|
||||
const router = useRouter();
|
||||
|
||||
console.log(router.query.workspaceId);
|
||||
dataCenter
|
||||
.loadPublicWorkspace(router.query.workspaceId as string)
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
});
|
||||
return (
|
||||
<>
|
||||
{workspace && page && (
|
||||
|
||||
@@ -4,12 +4,21 @@ import { PageListHeader } from '@/components/header';
|
||||
import { ReactElement } from 'react';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
import { useRouter } from 'next/router';
|
||||
const All = () => {
|
||||
const { pageList } = useAppState();
|
||||
const { t } = useTranslation();
|
||||
const { dataCenter } = useAppState();
|
||||
const router = useRouter();
|
||||
|
||||
console.log(router.query.workspaceId);
|
||||
dataCenter
|
||||
.loadPublicWorkspace(router.query.workspaceId as string)
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
});
|
||||
return (
|
||||
<>
|
||||
<PageListHeader icon={<AllPagesIcon />}>{t('All pages')}</PageListHeader>
|
||||
<PageList
|
||||
pageList={pageList.filter(p => !p.trash)}
|
||||
showFavoriteTag={true}
|
||||
|
||||
Reference in New Issue
Block a user