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