hunk.code_window:     const id = MessageRepository.createObjectId();
       template = await session.createTemplate({
         steps: [
           {
             type: ChannelTypeEnum.SMS,
             content: 'Hello world {{customVar}}' as string,
           },
           {
             type: ChannelTypeEnum.DIGEST,
             content: '',
             metadata: {
               unit: DigestUnitEnum.MINUTES,
  
hunk.labels: keep keep keep replace replace replace replace keep keep keep keep keep
hunk.file_path: apps/api/src/app/events/e2e/digest-events.e2e.ts
hunk.type: replace
file: import { IUserEntity, IMessage } from '@novu/shared';
  import { useMantineColorScheme } from '@mantine/core';
  import React from 'react';
  import { API_ROOT, WS_URL } from '../../config';
  import { useEnvController } from '../../store/use-env-controller';
  import { NotificationBell, NovuProvider, PopoverNotificationCenter } from '@novu/notification-center';
  
  export function NotificationCenterWidget({ user }: { user: IUserEntity | undefined }) {
    const { environment } = useEnvController();
    const { colorScheme } = useMantineColorScheme();
  
    function handlerOnNotificationClick(message: IMessage) {
      if (message?.cta?.data?.url) {
        window.location.href = message.cta.data.url;
      }
    }
  
    return (
      <>
        <NovuProvider
          backendUrl={API_ROOT}
          socketUrl={WS_URL}
          subscriberId={user?._id as string}
          applicationIdentifier={environment?.identifier as string}
        >
          <PopoverNotificationCenter colorScheme={colorScheme} onNotificationClick={handlerOnNotificationClick}>
            {({ unseenCount }) => {
              return <NotificationBell colorScheme={colorScheme} unseenCount={unseenCount} />;
            }}
          </PopoverNotificationCenter>
        </NovuProvider>
      </>
    );
  }
  