🐛 Fix bugs in PingModule

This commit is contained in:
ajnart
2022-08-02 05:22:02 +02:00
parent 33b84b9039
commit c4d8fb2e00

View File

@@ -56,22 +56,23 @@ export default function PingComponent(props: any) {
return null; return null;
} }
return ( return (
<Tooltip <motion.div
radius="lg"
style={{ position: 'absolute', bottom: 20, right: 20 }} style={{ position: 'absolute', bottom: 20, right: 20 }}
label={ animate={{
isOnline === 'loading' scale: isOnline === 'online' ? [1, 0.8, 1] : 1,
? 'Loading...' }}
: isOnline === 'online' transition={{ repeat: Infinity, duration: 2.5, ease: 'easeInOut' }}
? `Online - ${response}`
: `Offline - ${response}`
}
> >
<motion.div <Tooltip
animate={{ withinPortal
scale: isOnline === 'online' ? [1, 0.8, 1] : 1, radius="lg"
}} label={
transition={{ repeat: Infinity, duration: 2.5, ease: 'easeInOut' }} isOnline === 'loading'
? 'Loading...'
: isOnline === 'online'
? `Online - ${response}`
: `Offline - ${response}`
}
> >
<Indicator <Indicator
size={13} size={13}
@@ -79,7 +80,7 @@ export default function PingComponent(props: any) {
> >
{null} {null}
</Indicator> </Indicator>
</motion.div> </Tooltip>
</Tooltip> </motion.div>
); );
} }