web / useNotifyMe
Function: useNotifyMe() ​
useNotifyMe():
object
Defined in: apps/web/app/composables/useNotifyMe/useNotifyMe.ts:11
Returns ​
UseNotifyMeReturn
confirmNotifyMe() ​
confirmNotifyMe: (
params) =>Promise<false|NotifyMeSuccessResponse&object>
Parameters ​
params ​
NotifyMeRouteTokenParams
Returns ​
Promise<false | NotifyMeSuccessResponse & object>
ConfirmNotifyMe
Description ​
Function for confirming the back in stock notifications subscription (opt-in).
Example ​
const result = await confirmNotifyMe({token: '[token]'});loading ​
loading:
Ref<boolean,boolean> =false
subscribe() ​
subscribe: (
params) =>Promise<false|NotifyMeSuccessResponse&object>
Parameters ​
params ​
NotifyMeSubscribeParams
Returns ​
Promise<false | NotifyMeSuccessResponse & object>
Description ​
Function for subscribing to the back in stock notifications.
Example ​
const result = await subscribe({
email: 'test@test.de',
variationId: 1,
lang: 'de',
'cf-turnstile-response': '[token]'
});unsubscribeNotifyMe() ​
unsubscribeNotifyMe: (
params) =>Promise<false|NotifyMeSuccessResponse&object>
Parameters ​
params ​
NotifyMeRouteTokenParams
Returns ​
Promise<false | NotifyMeSuccessResponse & object>
UnsubscribeNotifyMe
Description ​
Function for unsubscribing from notify me notifications.
Example ​
const result = await unsubscribeNotifyMe({token: '[token]'});Description ​
Composable for subscribing to the back in stock notifications.
Example ​
const { loading, subscribe, confirmNotifyMe, unsubscribeNotifyMe } = useNotifyMe();