Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Mar 26, 2020
1 parent 5979461 commit b4f0a94
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const Dialog: React.FC = () => {
const isCodeComment =
comment.references[0] && comment.references[0].type === 'code';

// this could rather be `getInitialPosition`
const positions = getPositions(
currentCommentPositions,
isCodeComment,
Expand All @@ -52,6 +53,7 @@ export const Dialog: React.FC = () => {
// reset editing when comment changes
React.useEffect(() => {
setEditing(isNewComment);
// this could rather be `getAnimatedPosition`
const updatedPositions = getPositions(
currentCommentPositions,
isCodeComment,
Expand All @@ -70,10 +72,6 @@ export const Dialog: React.FC = () => {
isNewComment,
]);

/** Position the dialog and transition in to give context */

/** Recheck the position when the dialog ref or the comment changes */

if (!currentCommentPositions) {
return null;
}
Expand Down

0 comments on commit b4f0a94

Please sign in to comment.