fix: Various React errors in console
This commit is contained in:
@ -45,11 +45,13 @@ class MainSidebar extends React.Component<Props> {
|
||||
this.props.documents.fetchDrafts();
|
||||
}
|
||||
|
||||
handleCreateCollection = () => {
|
||||
handleCreateCollection = (ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
this.props.ui.setActiveModal('collection-new');
|
||||
};
|
||||
|
||||
handleInviteModalOpen = () => {
|
||||
handleInviteModalOpen = (ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
this.inviteModalOpen = true;
|
||||
};
|
||||
|
||||
@ -145,6 +147,7 @@ class MainSidebar extends React.Component<Props> {
|
||||
/>
|
||||
{can.invite && (
|
||||
<SidebarLink
|
||||
to="/settings/people"
|
||||
onClick={this.handleInviteModalOpen}
|
||||
icon={<PlusIcon />}
|
||||
label="Invite people…"
|
||||
|
@ -66,9 +66,11 @@ class Collections extends React.Component<Props> {
|
||||
/>
|
||||
))}
|
||||
<SidebarLink
|
||||
to="/collections"
|
||||
onClick={this.props.onCreateCollection}
|
||||
icon={<PlusIcon />}
|
||||
label="New collection…"
|
||||
exact
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
|
@ -51,6 +51,7 @@ export default function Contents({ document }: Props) {
|
||||
<List>
|
||||
{headings.map(heading => (
|
||||
<ListItem
|
||||
key={heading.slug}
|
||||
level={heading.level}
|
||||
active={activeSlug === heading.slug}
|
||||
>
|
||||
|
Reference in New Issue
Block a user