Resolve the exhaustive-deps findings and attach cause to the rethrown errors. [skip build]
Checks / checks (push) Successful in 2m7s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-01 23:04:36 +11:00
parent 027dbee1f1
commit 634d1e0a0f
12 changed files with 31 additions and 49 deletions
+9 -15
View File
@@ -62,18 +62,12 @@ export const useAuthenticatedMediaUrl = (
* Creates an authenticated fetch function for media URLs.
* Useful for components that need to load multiple images.
*/
export const useAuthenticatedMediaFetch = () => {
const mx = useMatrixClient();
return useCallback(
async (src: string, useAuthentication = true): Promise<string> => {
try {
return await resolveAuthenticatedMediaUrl(src, useAuthentication);
} catch (error) {
console.warn('[useAuthenticatedMediaFetch] Error fetching authenticated media:', error);
return src;
}
},
[mx],
);
};
export const useAuthenticatedMediaFetch = () =>
useCallback(async (src: string, useAuthentication = true): Promise<string> => {
try {
return await resolveAuthenticatedMediaUrl(src, useAuthentication);
} catch (error) {
console.warn('[useAuthenticatedMediaFetch] Error fetching authenticated media:', error);
return src;
}
}, []);