-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update activity library custom tab empty state (#9666)
- Loading branch information
1 parent
fb76d9a
commit 240e78d
Showing
2 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/client/components/ActivityLibrary/ActivityLibraryEmptyState.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react' | ||
import halloweenRetrospectiveTemplate from '../../../../static/images/illustrations/halloweenRetrospectiveTemplate.png' | ||
import {AllCategoryID, QUICK_START_CATEGORY_ID} from './Categories' | ||
import CreateActivityCard from './CreateActivityCard' | ||
|
||
type Props = { | ||
categoryId: AllCategoryID | ||
searchQuery: string | ||
} | ||
|
||
const ActivityLibraryEmptyState = (props: Props) => { | ||
const {categoryId, searchQuery} = props | ||
const showResultsNotFound = categoryId !== 'custom' || searchQuery !== '' | ||
|
||
return ( | ||
<div className='mx-auto flex p-2 text-slate-700'> | ||
<div className='ml-10'> | ||
{showResultsNotFound && ( | ||
<> | ||
<img className='w-32' src={halloweenRetrospectiveTemplate} /> | ||
<div className='mb-4 text-xl font-semibold'>No results found!</div> | ||
<div className='mb-6 max-w-[360px]'> | ||
Try tapping a category above, using a different search, or creating exactly what you | ||
have in mind. | ||
</div> | ||
</> | ||
)} | ||
<div className='h-40 w-64'> | ||
<CreateActivityCard category={QUICK_START_CATEGORY_ID} className='h-full' /> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default ActivityLibraryEmptyState |