Skip to content

Commit

Permalink
Fix [UI] Warning: findDOMNode is deprecated (#2833)
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-prokopchuk authored Oct 21, 2024
1 parent 91ca2b0 commit 19c15bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/common/Download/DownloadContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
under the Apache 2.0 license is conditioned upon your compliance with
such restriction.
*/
import React from 'react'
import React, { useRef } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { Transition, TransitionGroup } from 'react-transition-group'
import { isEmpty } from 'lodash'
Expand All @@ -31,6 +31,7 @@ import { ReactComponent as CloseIcon } from 'igz-controls/images/close.svg'
import './downloadContainer.scss'

const DownloadContainer = () => {
const nodeRef = useRef(null)
const downloadStore = useSelector(store => store.downloadStore)
const dispatch = useDispatch()
const duration = 500
Expand Down Expand Up @@ -60,7 +61,7 @@ const DownloadContainer = () => {
return (
<TransitionGroup component={null}>
{!isEmpty(downloadStore.downloadList) && downloadStore.showDownloadsList && (
<Transition timeout={duration}>
<Transition timeout={duration} nodeRef={nodeRef}>
{state => (
<div
className="download-container"
Expand Down
3 changes: 2 additions & 1 deletion src/common/Notification/Notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const Notification = () => {
<div className="notifications-wrapper">
<TransitionGroup component={null}>
{notificationStore.notification.map(item => {
const nodeRef = React.createRef()
const isSuccessResponse = inRange(item.status, 200, 300)

const transitionStyles = {
entered: {
transform: 'translateY(0)',
Expand All @@ -68,6 +68,7 @@ const Notification = () => {

return (
<Transition
nodeRef={nodeRef}
key={`css${item.id}`}
timeout={duration}
onEntered={() => {
Expand Down

0 comments on commit 19c15bb

Please sign in to comment.