Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

451 B
Raw Blame
import { LocalPageNode } from '@colanode/client/types';
import { NodeRole, hasNodeRole } from '@colanode/core';
import { Document } from '@colanode/ui/components/documents/document';

interface PageContainerProps {
  page: LocalPageNode;
  role: NodeRole;
}

export const PageContainer = ({ page, role }: PageContainerProps) => {
  const canEdit = hasNodeRole(role, 'editor');
  return <Document node={page} canEdit={canEdit} autoFocus="start" />;
};