fix: Cannot create collection if all existing collections are deleted (#3836)
This commit is contained in:
@@ -8,7 +8,6 @@ import Collection from "~/models/Collection";
|
||||
import Flex from "~/components/Flex";
|
||||
import Error from "~/components/List/Error";
|
||||
import PaginatedList from "~/components/PaginatedList";
|
||||
import Text from "~/components/Text";
|
||||
import { createCollection } from "~/actions/definitions/collections";
|
||||
import useStores from "~/hooks/useStores";
|
||||
import DraggableCollectionLink from "./DraggableCollectionLink";
|
||||
@@ -63,11 +62,6 @@ function Collections() {
|
||||
/>
|
||||
) : undefined
|
||||
}
|
||||
empty={
|
||||
<Empty type="tertiary" size="small">
|
||||
{t("Empty")}
|
||||
</Empty>
|
||||
}
|
||||
renderError={(props) => <StyledError {...props} />}
|
||||
renderItem={(item: Collection, index) => (
|
||||
<DraggableCollectionLink
|
||||
@@ -78,22 +72,14 @@ function Collections() {
|
||||
belowCollection={orderedCollections[index + 1]}
|
||||
/>
|
||||
)}
|
||||
>
|
||||
<SidebarAction action={createCollection} depth={0} />
|
||||
</PaginatedList>
|
||||
/>
|
||||
<SidebarAction action={createCollection} depth={0} />
|
||||
</Relative>
|
||||
</Header>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
|
||||
const Empty = styled(Text)`
|
||||
margin-left: 36px;
|
||||
margin-bottom: 0;
|
||||
line-height: 34px;
|
||||
font-style: italic;
|
||||
`;
|
||||
|
||||
const StyledError = styled(Error)`
|
||||
font-size: 15px;
|
||||
padding: 0 8px;
|
||||
|
||||
Reference in New Issue
Block a user