Skip to content

Commit

Permalink
refactor: extract consts
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jun 21, 2022
1 parent eb291f8 commit 6d5b77a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/message/src/message-method.ts
Expand Up @@ -60,7 +60,10 @@ const normalizeOptions = (params?: MessageParams) => {
return normalized as MessageParamsNormalized
}

const getNextOffset = (offset: number) => offset + 48 + 16
const MESSAGE_HEIGHT = 48
const MESSAGE_GAP = 16

const getNextOffset = (offset: number) => offset + MESSAGE_HEIGHT + MESSAGE_GAP

const computeOffset = () => {
if (instances.length === 0) return
Expand Down

0 comments on commit 6d5b77a

Please sign in to comment.