import { observer } from "mobx-react"; import * as React from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import { $Diff } from "utility-types"; import User from "~/models/User"; import Avatar from "~/components/Avatar"; import Badge from "~/components/Badge"; import Flex from "~/components/Flex"; import { Props as TableProps } from "~/components/Table"; import Time from "~/components/Time"; import useCurrentUser from "~/hooks/useCurrentUser"; import UserMenu from "~/menus/UserMenu"; // @ts-expect-error ts-migrate(2344) FIXME: Type 'Props' does not satisfy the constraint 'Comp... Remove this comment to see the full error message const Table = React.lazy( () => import( /* webpackChunkName: "table" */ "~/components/Table" ) ); type Props = $Diff< TableProps, { columns: any; } > & { data: User[]; canManage: boolean; }; function PeopleTable({ canManage, ...rest }: Props) { const { t } = useTranslation(); const currentUser = useCurrentUser(); const columns = React.useMemo( () => [ { id: "name", Header: t("Name"), accessor: "name", // @ts-expect-error ts-migrate(7031) FIXME: Binding element 'value' implicitly has an 'any' ty... Remove this comment to see the full error message Cell: observer(({ value, row }) => ( {value}{" "} {currentUser.id === row.original.id && `(${t("You")})`} )), }, canManage ? { id: "email", Header: t("Email"), accessor: "email", // @ts-expect-error ts-migrate(7031) FIXME: Binding element 'value' implicitly has an 'any' ty... Remove this comment to see the full error message Cell: observer(({ value }) => value), } : undefined, { id: "lastActiveAt", Header: t("Last active"), accessor: "lastActiveAt", Cell: observer( // @ts-expect-error ts-migrate(7031) FIXME: Binding element 'value' implicitly has an 'any' ty... Remove this comment to see the full error message ({ value }) => value &&