refactor: use blurhash to render background

This commit is contained in:
Prayag Prajapati committed 2025-07-04 15:19:38 +05:30
1 parent 53311a1728
commit c9d16f4669
12 files changed
+205 -164

No files matched your search

+10 -10
View File
@@ -1,6 +1,6 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { createRouter, RouterProvider } from "@tanstack/react-router";
import React from "react";
import React, { useEffect } from "react";
import ReactDOM from "react-dom/client";
// Import the generated route tree
import { routeTree } from "./routeTree.gen";
@@ -64,15 +64,15 @@ function ProviderWrapper() {
if (api?.accessToken && !user?.Id) {
fetchCurrentUser(api);
}
// useEffect(() => {
// if (api) {
// console.log(`API is set - Route ${window.location.pathname}`);
// console.log(api);
// } else {
// console.log(`API is not set - Route ${window.location.pathname}`);
// }
// router.invalidate(); // This is a hack to force the router to re-evaluate the routes and re-run the beforeLoad functions
// }, [api]);
useEffect(() => {
if (api) {
console.log(`API is set - Route ${window.location.pathname}`);
console.log(api);
} else {
console.log(`API is not set - Route ${window.location.pathname}`);
}
router.invalidate(); // This is a hack to force the router to re-evaluate the routes and re-run the beforeLoad functions
}, [api]);
return (
<RouterProvider
router={router}