mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-25 00:46:46 +00:00
18 lines
441 B
JavaScript
18 lines
441 B
JavaScript
import { v4 as uuidv4 } from 'uuid'
|
|
|
|
export const createNewUndoRedoActionGroupId = () => {
|
|
return uuidv4()
|
|
}
|
|
|
|
export const UNDO_REDO_ACTION_GROUP_HEADER = 'ClientUndoRedoActionGroupId'
|
|
|
|
export const getUndoRedoActionRequestConfig = ({ undoRedoActionGroupId }) => {
|
|
const config = {}
|
|
if (undoRedoActionGroupId != null) {
|
|
config.headers = {
|
|
[UNDO_REDO_ACTION_GROUP_HEADER]: undoRedoActionGroupId,
|
|
}
|
|
return config
|
|
}
|
|
}
|