mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-07-08 04:07:12 -06:00
11 lines
352 B
JavaScript
11 lines
352 B
JavaScript
import imagesData from './Images.json';
|
|
|
|
// Function to search and filter images based on the provided category
|
|
export const ImageFinder = (category) => {
|
|
if (category === 'all') {
|
|
return imagesData;
|
|
} else {
|
|
const filteredImages = imagesData.filter(image => image.category === category);
|
|
return filteredImages;
|
|
}
|
|
}; |