Add support for offline lottie

In air gapped, lotties won't load because the WASM player is fetched from CDN. This PR bundles the player so we can fetch it directly from file system
This commit is contained in:
Maidul Islam
2025-05-29 21:46:45 -04:00
parent 5a07c3d1d4
commit 6cbeb4ddf9

View File

@@ -2,6 +2,8 @@ import { StrictMode } from "react";
import ReactDOM from "react-dom/client";
import { createRouter, RouterProvider } from "@tanstack/react-router";
import NProgress from "nprogress";
import { setWasmUrl } from '@lottiefiles/dotlottie-react';
import lottieWasmUrl from '@lottiefiles/dotlottie-web/dist/dotlottie-player.wasm?url';
import { ContentLoader } from "./components/v2";
import { queryClient } from "./hooks/api/reactQuery";
@@ -22,6 +24,9 @@ import "./translation";
// have a look at the Quick start guide
// for passing in lng and translations on init/
// Configure Lottie player to use local WASM file
setWasmUrl(lottieWasmUrl);
// Create a new router instance
NProgress.configure({ showSpinner: false });