import {OverlayTrigger, Tooltip} from "react-bootstrap"; import React, {useEffect, useState, useRef} from "react"; import {useClickAway} from "./useClickAway"; export function Notification({id, tip, content}) { const [show, setShow] = useState(false); useEffect(() => { setTimeout(() => { setShow(true) }, 100); setTimeout(() => { setShow(false) }, 5000); }, []); return ( setShow(false)} overlay={{tip}} rootClose > {content} ) }