Skip to content

Commit

Permalink
[#122] refactor: 들여쓰기 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
domino8788 committed Dec 17, 2020
1 parent 504282b commit 313b814
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions frontend/src/components/pages/PageComponent/PageComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ function PageComponent(): JSX.Element {
});

const createBlockHandler = async () => {
if (children[children.length - 1].value !== '') {
const { parent, block } = await createBlock({
parentBlockId: page.rootId,
});
startTransaction();
setBlock(parent.id, parent);
setBlock(block.id, block);
setFocus(block);
commitTransaction();
} else {
if (children[children.length - 1].value === '') {
setFocus(children[children.length - 1]);
return;
}
const { parent, block } = await createBlock({
parentBlockId: page.rootId,
});
startTransaction();
setBlock(parent.id, parent);
setBlock(block.id, block);
setFocus(block);
commitTransaction();
};

return (
Expand Down

0 comments on commit 313b814

Please sign in to comment.