blob: 3e2a197678cd9f3ac9db53a910538a3f47e0e296 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { SERIES_INFO } from "./data-fetch";
const PreFecthSeriesInfo = async (data) => {
try {
const fetchPromises = data.results.map(async (element) => {
await SERIES_INFO(element.id);
});
await Promise.all(fetchPromises);
console.log("Series info pre-fetched successfully!");
} catch (error) {
console.error(
"Error occurred while pre-fetching series info page:",
error
);
}
};
export default PreFecthSeriesInfo;
|