This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
24 lines
718 B
TypeScript
24 lines
718 B
TypeScript
import { PlusIcon } from "outline-icons";
|
|
import * as React from "react";
|
|
import stores from "~/stores";
|
|
import Invite from "~/scenes/Invite";
|
|
import { createAction } from "~/actions";
|
|
import { UserSection } from "~/actions/sections";
|
|
|
|
export const inviteUser = createAction({
|
|
name: ({ t }) => `${t("Invite people")}…`,
|
|
icon: <PlusIcon />,
|
|
keywords: "team member user",
|
|
section: UserSection,
|
|
visible: ({ stores }) =>
|
|
stores.policies.abilities(stores.auth.team?.id || "").inviteUser,
|
|
perform: ({ t }) => {
|
|
stores.dialogs.openModal({
|
|
title: t("Invite people"),
|
|
content: <Invite onSubmit={stores.dialogs.closeAllModals} />,
|
|
});
|
|
},
|
|
});
|
|
|
|
export const rootUserActions = [inviteUser];
|