fix: Flash of empty state on paginated lists (#3351)

* fix: Flash of empty state on paginated lists
fix: Typing of PaginatedList to generic

* test

* test
This commit is contained in:
Tom Moor
2022-04-09 20:31:51 -07:00
committed by GitHub
parent 9281287dba
commit b7a6a34565
39 changed files with 202 additions and 140 deletions

View File

@@ -2,6 +2,7 @@ import { observer } from "mobx-react";
import { CodeIcon } from "outline-icons";
import * as React from "react";
import { useTranslation, Trans } from "react-i18next";
import ApiKey from "~/models/ApiKey";
import APITokenNew from "~/scenes/APITokenNew";
import { Action } from "~/components/Actions";
import Button from "~/components/Button";
@@ -59,7 +60,7 @@ function Tokens() {
fetch={apiKeys.fetchPage}
items={apiKeys.orderedData}
heading={<Subheading sticky>{t("Tokens")}</Subheading>}
renderItem={(token) => (
renderItem={(token: ApiKey) => (
<TokenListItem key={token.id} token={token} onDelete={token.delete} />
)}
/>