This commit is contained in:
sarendsen
2025-01-06 14:45:42 +01:00
parent 74ce9d7eea
commit 3fae21d559
3 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ import { useAtom, useAtomValue } from "jotai";
import { useEffect, useMemo } from "react";
import { Platform } from "react-native";
// import { getColors } from "react-native-image-colors";
const getColors = !Platform.isTV ? require("react-native-image-colors") : null;
const Colors = !Platform.isTV ? require("react-native-image-colors") : null;
/**
* Custom hook to extract and manage image colors for a given item.
@@ -66,7 +66,7 @@ export const useImageColors = ({
}
// Extract colors from the image
getColors(source.uri, {
Colors.getColors(source.uri, {
fallback: "#fff",
cache: false,
})