mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
32 lines
799 B
TypeScript
32 lines
799 B
TypeScript
import { LiveProvider } from "@refinedev/core";
|
|
|
|
/**
|
|
* Check out the Live Provider documentation for detailed information
|
|
* https://refine.dev/docs/api-reference/core/providers/live-provider/
|
|
**/
|
|
export const liveProvider = (): LiveProvider => ({
|
|
subscribe: ({ callback, channel, types, params }) => {
|
|
console.log("subscribe", {
|
|
callback,
|
|
channel,
|
|
types,
|
|
params,
|
|
});
|
|
},
|
|
unsubscribe: ({ channel, types, params }) => {
|
|
console.log("unsubscribe", {
|
|
channel,
|
|
types,
|
|
params,
|
|
});
|
|
},
|
|
publish: ({ channel, type, date, payload }) => {
|
|
console.log("publish", {
|
|
channel,
|
|
type,
|
|
date,
|
|
payload,
|
|
});
|
|
},
|
|
});
|