Preferences - Categories - Restrictions by user #151
-
Is there a way to show preferences to users with alerts in these categories? For example: Receiving a message works fine but they see all of the settings for all the categories I am using buld-in code to display messages |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, Are you using the react sdk to show your user's inbox and preferences? If you do, it's possible to customize the preferences shown: import { MagicBellProvider, NotificationPreferences } from '@magicbell/magicbell-react';
function Component() {
return (
<MagicBellProvider apiKey={API_KEY} userEmail={USER_EMAIL}>
<NotificationPreferences channels={['email']} categories={['announcements', 'billing']} />
</MagicBellProvider>
);
} Please see here for the docs: https://www.npmjs.com/package/@magicbell/magicbell-react#notificationpreferences In this example, I'm rendering the preferences component standalone so it can be embedded on say a user settings page. But it's also possible to provide it to the Inbox using the NotificationPreferences property, to replace the default checkboxes with your own implementation. |
Beta Was this translation helpful? Give feedback.
I think if you don't use react, the best option at this moment would be to use our js api client and build your own preferences component.