Fix images recycling keys

This commit is contained in:
Zoe Roux 2025-12-06 01:48:27 +01:00
parent 2deeaaf97e
commit 0f62854128
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -28,10 +28,12 @@ export const ImageBackground = ({
const { css, theme } = useYoshiki();
const { apiUrl, authToken } = useToken();
const uri = src ? `${apiUrl}${src[quality ?? "high"]}` : null;
return (
<EImageBackground
recyclingKey={uri}
source={{
uri: src ? `${apiUrl}${src[quality ?? "high"]}` : null,
uri,
// use cookies on web to allow `img` to make the call instead of js
headers:
authToken && Platform.OS !== "web"

View File

@ -37,10 +37,12 @@ export const Image = ({
const { css, theme } = useYoshiki();
const { apiUrl, authToken } = useToken();
const uri = src ? `${apiUrl}${src[quality ?? "high"]}` : null;
return (
<EImage
recyclingKey={uri}
source={{
uri: src ? `${apiUrl}${src[quality ?? "high"]}` : null,
uri,
// use cookies on web to allow `img` to make the call instead of js
headers:
authToken && Platform.OS !== "web"