This update includes creating new files for the notifications feature along with adding two feature flags for enabling notifications and realtime notifications. All the code and package dependencies required for the notifications functionality have been added. The 'pnpm-lock.yaml' has also been updated due to the inclusion of new package dependencies.
23 lines
532 B
TypeScript
23 lines
532 B
TypeScript
import { use } from 'react';
|
|
|
|
import { NotificationsPopover } from '@kit/notifications/components';
|
|
|
|
import featuresFlagConfig from '~/config/feature-flags.config';
|
|
|
|
import { loadUserWorkspace } from '../_lib/server/load-user-workspace';
|
|
|
|
export function UserNotifications() {
|
|
const { user } = use(loadUserWorkspace());
|
|
|
|
if (!featuresFlagConfig.enableNotifications) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<NotificationsPopover
|
|
accountIds={[user.id]}
|
|
realtime={featuresFlagConfig.realtimeNotifications}
|
|
/>
|
|
);
|
|
}
|