diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-09-09 16:30:32 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-09-15 17:24:53 +0200 |
| commit | 6eca5c3834403293c4838c6f637d330dc8b74829 (patch) | |
| tree | 5ae44d6c90c527f836971a49a0333471f782d81d /gui/src/renderer/components | |
| parent | 5b0c56c4c703596bc604671387ccdbd10f13882e (diff) | |
| download | mullvadvpn-6eca5c3834403293c4838c6f637d330dc8b74829.tar.xz mullvadvpn-6eca5c3834403293c4838c6f637d330dc8b74829.zip | |
Fix notification cropping
Diffstat (limited to 'gui/src/renderer/components')
| -rw-r--r-- | gui/src/renderer/components/NotificationBanner.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/src/renderer/components/NotificationBanner.tsx b/gui/src/renderer/components/NotificationBanner.tsx index 82cf92e129..9f8c63e4b2 100644 --- a/gui/src/renderer/components/NotificationBanner.tsx +++ b/gui/src/renderer/components/NotificationBanner.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import { colors } from '../../config.json'; @@ -138,7 +138,7 @@ export function NotificationBanner(props: INotificationBannerProps) { prevChildren.current = props.children ?? prevChildren.current; }, [props.children]); - useLayoutEffect(() => { + useEffect(() => { const newHeight = props.children !== undefined ? contentRef.current?.getBoundingClientRect().height ?? 0 : 0; if (newHeight !== contentHeight) { |
