module introduction
This commit is contained in:
parent
2a126dc58b
commit
7422e4ba23
18
src/components/animations/Loading.jsx
Normal file
18
src/components/animations/Loading.jsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import React from "react";
|
||||
import Lottie from "lottie-react";
|
||||
|
||||
import loadingTruck from "../../assets/animations/chargement-vehicules-boom.json";
|
||||
import { useUser } from "../../hooks/useUser";
|
||||
|
||||
export default function Loading() {
|
||||
const { screensTranslations } = useUser();
|
||||
|
||||
if (!screensTranslations || !screensTranslations?.ui?.loading) return;
|
||||
|
||||
return (
|
||||
<div className='loading'>
|
||||
<Lottie className='loading__animation' animationData={loadingTruck} loop autoplay />
|
||||
<p className='loading__text'>{screensTranslations.ui.loading}...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user