Skip to content

Commit

Permalink
fix: empty state for workflows page message
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Aug 4, 2024
1 parent 0acb259 commit d3427e6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/components/nav/RootNavMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const RootNavMenu: React.FC = () => {
{IS_EE_AUTH_ENABLED ? <OrganizationSwitcher /> : <OrganizationSelect />}
<NavMenuLinkButton
label="Get started"
isVisible={!isEnvReadonly && !isLoadingOnboardingStatus && showOnboarding}
isVisible={!isLoadingOnboardingStatus && showOnboarding}
icon={<IconTaskAlt />}
link={ROUTES.GET_STARTED}
testId="side-nav-quickstart-link"
Expand Down
23 changes: 22 additions & 1 deletion apps/web/src/pages/templates/WorkflowListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import { When } from '../../components/utils/When';
import { ListPage } from '../../components/layout/components/ListPage';
import { WorkflowListNoMatches } from './WorkflowListNoMatches';
import { GetStartedPageV2 } from '../../studio/components/GetStartedPageV2/index';
import { css } from '@novu/novui/css';
import { Button } from '@novu/novui';

const columns: IExtendedColumn<INotificationTemplateExtended>[] = [
{
Expand Down Expand Up @@ -316,9 +318,28 @@ function WorkflowListPage() {
onAllTemplatesClick={openModal}
/>
</When>

<When truthy={shouldShowEmptyState && isV2Enabled}>
<GetStartedPageV2 location="get-started" />
<div
className={css({
color: colors.B40,
fontSize: '18px',
lineHeight: '22px',
textAlign: 'center',
maxWidth: '600px',
margin: '0 auto',
marginTop: '80px',
})}
>
To create a workflow in this environment, you need to create a workflow using the @novu/framework and sync
it using the {readonly ? 'production' : 'development'} secret key. Follow{' '}
<Link className={css({ textDecoration: 'underline' })} to={ROUTES.GET_STARTED}>
this guide
</Link>{' '}
to get started.
</div>
</When>

<TemplatesStoreModal />
</TemplateListTableWrapper>
</ListPage>
Expand Down

0 comments on commit d3427e6

Please sign in to comment.