From a16cf72b73c9f091ce738fb2f3bb9234a1fe8c9d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 16 Jul 2022 00:11:04 +0100 Subject: [PATCH] feat: Error state for paginated lists (#3766) * Add error state for failed list loading * Move sidebar collections to PaginatedList for improved error handling, loading, retrying etc --- app/components/ButtonLink.tsx | 13 +- app/components/Empty.ts | 1 + app/components/List/Error.tsx | 53 ++++++++ app/components/PaginatedDocumentList.tsx | 2 + app/components/PaginatedList.tsx | 52 +++++--- .../Sidebar/components/Collections.tsx | 115 ++++++++---------- shared/i18n/locales/en_US/translation.json | 5 +- 7 files changed, 148 insertions(+), 93 deletions(-) create mode 100644 app/components/List/Error.tsx diff --git a/app/components/ButtonLink.tsx b/app/components/ButtonLink.tsx index 4d3463928..1bb65ac62 100644 --- a/app/components/ButtonLink.tsx +++ b/app/components/ButtonLink.tsx @@ -1,17 +1,6 @@ -import * as React from "react"; import styled from "styled-components"; -type Props = { - onClick?: React.MouseEventHandler; -}; - -const ButtonLink: React.FC = React.forwardRef( - (props: Props, ref: React.Ref) => { - return