mistercrunch commented on code in PR #31565:
URL: https://github.com/apache/superset/pull/31565#discussion_r1994214974


##########
superset-frontend/src/components/Loading/index.tsx:
##########
@@ -61,6 +60,38 @@ export default function Loading({
   image,
   className,
 }: Props) {
+  const [Loader, setLoader] = useState<string | undefined>(undefined);
+  useEffect(() => {
+    console.log('Fetching loader...');
+    fetch('/superset/loader/', {
+      method: 'GET',
+      credentials: 'include',
+    })
+      .then(response => {
+        console.log('Response status:', response.status);
+        if (!response.ok) {
+          if (response.status === 401) {
+            console.error('User is not authenticated');
+          } else if (response.status === 403) {
+            console.error('User does not have permission to access this 
endpoint');
+          }
+          throw new Error(`HTTP error! status: ${response.status}`);
+        }
+        return response.json();
+      })
+      .then(data => {
+        console.log('Received data:', data);
+        // Vérifie si l'objet a une clé "src" et l'assigne

Review Comment:
   `en` plz



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to