[Glitch] Add empty state to CollectionAdder component
Port 5098b8ccc9 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
08027edb10
commit
d9fa3feeeb
2 files changed
+32
-5
No files matched your search
+10
-4
@@ -29,8 +29,14 @@ import {
|
||||
} from '../editor';
|
||||
import classes from '../styles.module.scss';
|
||||
|
||||
const CreateButton: React.FC = () => (
|
||||
<Link to='/collections/new' className='button button--compact'>
|
||||
export const NewCollectionButton: React.FC<{ onClick?: () => void }> = ({
|
||||
onClick,
|
||||
}) => (
|
||||
<Link
|
||||
to='/collections/new'
|
||||
className='button button--compact'
|
||||
onClick={onClick}
|
||||
>
|
||||
<Icon id='plus' icon={AddIcon} />
|
||||
<FormattedMessage {...editorMessages.newCollection} />
|
||||
</Link>
|
||||
@@ -100,7 +106,7 @@ export const CollectionsCreatedByAccount: React.FC = () => {
|
||||
/>
|
||||
}
|
||||
>
|
||||
<CreateButton />
|
||||
<NewCollectionButton />
|
||||
</EmptyState>
|
||||
);
|
||||
} else {
|
||||
@@ -132,7 +138,7 @@ export const CollectionsCreatedByAccount: React.FC = () => {
|
||||
}}
|
||||
/>
|
||||
</h2>
|
||||
{showCreateButton && <CreateButton />}
|
||||
{showCreateButton && <NewCollectionButton />}
|
||||
</div>
|
||||
<ItemList>
|
||||
{isOwnCollectionPage && !canCreateMoreCollections && (
|
||||
|
||||
Reference in new issue
Block a user