Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed Apr 1, 2024
1 parent 0fff8b0 commit 163af98
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,6 @@ const createEmptyHeader = () => {
};
};

export const addEmptyHeaderSlateBlockToData = (
data,
index,
setSelectedBlock,
) => {
console.log(index);
const id = uuid();
setSelectedBlock(id);
return {
...data,
blocks: {
...data.blocks,
[id]: {
'@type': 'slate',
value: [{ type: 'h2', children: [{ text: '' }] }],
plaintext: '',
},
},
blocks_layout: {
...data.blocks_layout,
items: [
...data.blocks_layout.items.slice(0, index),
id,
...data.blocks_layout.items.slice(
index,
data.blocks_layout.items.length,
),
],
},
};
};

export const createSlateHeader = (text) => {
return isArray(text) ? text : [createEmptyHeader()];
};
Expand Down

0 comments on commit 163af98

Please sign in to comment.