useCASharePointNotificationCenter
@spartanfx/react / codeapps / useCASharePointNotificationCenter
Function: useCASharePointNotificationCenter()
function useCASharePointNotificationCenter(config): INotificationCenterHook;
Power Apps Code Apps NotificationCenter hook backed by SharePoint.
Consumes a generated <ListName>Service from pac code add-data-source
targeting the SharePoint connector (shared_sharepointonline).
Parameters
config
IUseCASharePointNotificationCenterConfig
Returns
Example
import { NotificationsService } from './generated/services/NotificationsService';
import { useCASharePointNotificationCenter } from '@spartanfx/react/codeapps';
const hook = useCASharePointNotificationCenter({
service: NotificationsService,
onNotify: (level, msg) => toast[level](msg),
});
return <NotificationCenter provider={hook} />;