🐛 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,9 +56,16 @@ 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 }}
animate={{
scale: isOnline === 'online' ? [1, 0.8, 1] : 1,
}}
transition={{ repeat: Infinity, duration: 2.5, ease: 'easeInOut' }}
>
<Tooltip
withinPortal
radius="lg"
label={ label={
isOnline === 'loading' isOnline === 'loading'
? 'Loading...' ? 'Loading...'
@@ -66,12 +73,6 @@ export default function PingComponent(props: any) {
? `Online - ${response}` ? `Online - ${response}`
: `Offline - ${response}` : `Offline - ${response}`
} }
>
<motion.div
animate={{
scale: isOnline === 'online' ? [1, 0.8, 1] : 1,
}}
transition={{ repeat: Infinity, duration: 2.5, ease: 'easeInOut' }}
> >
<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>
); );
} }