Skip to content

Commit

Permalink
Revert "Fix message size calculation"
Browse files Browse the repository at this point in the history
This reverts commit e9e8d7b.
  • Loading branch information
AdityaKhatri committed May 3, 2021
1 parent 442a08c commit da447df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 6 additions & 6 deletions components/View/Message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ export default class Message extends React.PureComponent {

handleResize = (e) => {
const {
0: { target },
0: {
contentRect: {
width,
height,
},
},
} = e;

const {
width,
height,
} = target.getBoundingClientRect();

const {
maxFontSize,
minFontSize,
Expand Down
4 changes: 0 additions & 4 deletions v2/View/Message/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function Message(props: Props) {

const handleResize = useCallback(
(e: ResizeObserverEntry[]) => {
/*
const {
0: {
contentRect: {
Expand All @@ -63,9 +62,6 @@ function Message(props: Props) {
},
},
} = e;
*/

const { width, height } = e[0]?.target?.getBoundingClientRect() ?? {};

const { current: container } = containerRef;

Expand Down

0 comments on commit da447df

Please sign in to comment.