mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor: remove sidebar in public workspace (#1730)
This commit is contained in:
@@ -18,7 +18,7 @@ import { WorkspaceAvatar } from '../../components/pure/footer';
|
||||
import { PageLoading } from '../../components/pure/loading';
|
||||
import { useBlockSuiteWorkspaceAvatarUrl } from '../../hooks/use-blocksuite-workspace-avatar-url';
|
||||
import { useBlockSuiteWorkspaceName } from '../../hooks/use-blocksuite-workspace-name';
|
||||
import { WorkspaceLayout } from '../../layouts';
|
||||
import { PublicWorkspaceLayout } from '../../layouts/public-workspace-layout';
|
||||
import type { NextPageWithLayout } from '../../shared';
|
||||
import { NavContainer, StyledBreadcrumbs } from './[workspaceId]/[pageId]';
|
||||
|
||||
@@ -59,7 +59,7 @@ const ListPageInner: React.FC<{
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<NavContainer>
|
||||
<NavContainer sx={{ px: '20px' }}>
|
||||
<Breadcrumbs>
|
||||
<StyledBreadcrumbs
|
||||
href={`/public-workspace/${blockSuiteWorkspace.id}`}
|
||||
@@ -123,5 +123,5 @@ const ListPage: NextPageWithLayout = () => {
|
||||
export default ListPage;
|
||||
|
||||
ListPage.getLayout = page => {
|
||||
return <WorkspaceLayout>{page}</WorkspaceLayout>;
|
||||
return <PublicWorkspaceLayout>{page}</PublicWorkspaceLayout>;
|
||||
};
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Breadcrumbs,
|
||||
displayFlex,
|
||||
IconButton,
|
||||
styled,
|
||||
} from '@affine/component';
|
||||
import { Breadcrumbs, displayFlex, styled } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { PageIcon } from '@blocksuite/icons';
|
||||
import { useAtomValue, useSetAtom } from 'jotai';
|
||||
@@ -22,14 +17,13 @@ import { WorkspaceAvatar } from '../../../components/pure/footer';
|
||||
import { PageLoading } from '../../../components/pure/loading';
|
||||
import { useBlockSuiteWorkspaceAvatarUrl } from '../../../hooks/use-blocksuite-workspace-avatar-url';
|
||||
import { useBlockSuiteWorkspaceName } from '../../../hooks/use-blocksuite-workspace-name';
|
||||
import { WorkspaceLayout } from '../../../layouts';
|
||||
import { PublicWorkspaceLayout } from '../../../layouts/public-workspace-layout';
|
||||
import type { NextPageWithLayout } from '../../../shared';
|
||||
import { initPage } from '../../../utils/blocksuite';
|
||||
import { initPage } from '../../../utils';
|
||||
|
||||
export const NavContainer = styled('div')(({ theme }) => {
|
||||
return {
|
||||
width: '100vw',
|
||||
padding: '0 12px',
|
||||
height: '60px',
|
||||
...displayFlex('start', 'center'),
|
||||
backgroundColor: theme.colors.pageBackground,
|
||||
@@ -54,15 +48,6 @@ export const StyledBreadcrumbs = styled(Link)(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
export const SearchButton = styled(IconButton)(({ theme }) => {
|
||||
return {
|
||||
color: theme.colors.iconColor,
|
||||
fontSize: '24px',
|
||||
marginLeft: 'auto',
|
||||
padding: '0 24px',
|
||||
};
|
||||
});
|
||||
|
||||
const PublicWorkspaceDetailPageInner: React.FC<{
|
||||
pageId: string;
|
||||
}> = ({ pageId }) => {
|
||||
@@ -141,5 +126,5 @@ export const PublicWorkspaceDetailPage: NextPageWithLayout = () => {
|
||||
export default PublicWorkspaceDetailPage;
|
||||
|
||||
PublicWorkspaceDetailPage.getLayout = page => {
|
||||
return <WorkspaceLayout>{page}</WorkspaceLayout>;
|
||||
return <PublicWorkspaceLayout>{page}</PublicWorkspaceLayout>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user