mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
16 lines
326 B
TypeScript
16 lines
326 B
TypeScript
import type { LiveEvent } from "@refinedev/core";
|
|
|
|
export const getRefineEvent = (
|
|
event: string,
|
|
): LiveEvent["type"] | undefined => {
|
|
if (event.includes(".create")) {
|
|
return "created";
|
|
}
|
|
if (event.includes(".update")) {
|
|
} else if (event.includes(".delete")) {
|
|
return "deleted";
|
|
}
|
|
|
|
return undefined;
|
|
};
|