Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: voicemail side menu #286

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions components/common/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ export const EmptyState: FC<EmptyStateProps> = ({
}): JSX.Element => {
return (
<>
<div className={classNames('text-center', 'p-8', className)}>
<div className="overflow-hidden rounded-lg bg-white shadow dark:bg-gray-800 px-8 py-7 text-center space-y-5">
<div className='text-gray-400 dark:text-gray-400'>{icon}</div>
<h3 className='mt-2 text-sm font-medium text-gray-900 dark:text-gray-100'>{title}</h3>
{description && (
<p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>{description}</p>
)}
{children && <div className='mt-6 flex flex-col items-center'>{children}</div>}
<div>
<h3 className='mt-2 text-sm font-medium text-gray-900 dark:text-gray-100'>{title}</h3>
{description && (
<p className='mt-1 text-sm text-gray-500 dark:text-gray-400'>{description}</p>
)}
{children && <div className='mt-6 flex flex-col items-center'>{children}</div>}
</div>
</div>
</>
)
Expand Down
24 changes: 13 additions & 11 deletions components/common/UserRightSideMenu/SpeedDialContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,19 @@ export const SpeedDialContent = () => {
))}
{/* empty state */}
{isSpeedDialLoaded && !getSpeedDialError && !speedDials.length && (
<EmptyState
title={t('SpeedDial.No speed dials')}
icon={
<FontAwesomeIcon icon={faBolt} className='mx-auto h-12 w-12' aria-hidden='true' />
}
>
<Button variant='white' onClick={() => openCreateSpeedDialDrawer()}>
<FontAwesomeIcon icon={faPlus} className='mr-2 h-4 w-4' />
<span>{t('SpeedDial.Create')}</span>
</Button>
</EmptyState>
<div className='px-6 py-4'>
<EmptyState
title={t('SpeedDial.No speed dials')}
icon={
<FontAwesomeIcon icon={faBolt} className='mx-auto h-12 w-12' aria-hidden='true' />
}
>
<Button variant='white' onClick={() => openCreateSpeedDialDrawer()}>
<FontAwesomeIcon icon={faPlus} className='mr-2 h-4 w-4' />
<span>{t('SpeedDial.Create')}</span>
</Button>
</EmptyState>
</div>
)}
{/* Iterate through speed dial list */}
{isSpeedDialLoaded &&
Expand Down
16 changes: 9 additions & 7 deletions components/common/UserRightSideMenu/UserLastCallsContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,15 @@ export const UserLastCallsContent = () => {
))}
{/* empty state */}
{lastCalls?.length === 0 && (
<EmptyState
title={t('LastCalls.No calls')}
icon={
<FontAwesomeIcon icon={faPhone} className='mx-auto h-12 w-12' aria-hidden='true' />
}
></EmptyState>
)}
<div className='px-6 py-4'>
<EmptyState
title={t('LastCalls.No calls')}
icon={
<FontAwesomeIcon icon={faPhone} className='mx-auto h-12 w-12' aria-hidden='true' />
}
></EmptyState>
</div>
)}
{/* Iterate through speed dial list */}
{lastCalls?.length! > 0 &&
lastCalls?.map((call: any, key: any) => (
Expand Down
Loading
Loading