Initial commit

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-10-26 14:49:35 +01:00
parent 4fb9506038
commit 96e78d1e23
19 changed files with 360 additions and 92 deletions

21
src/lib/utils/picsum.ts Normal file
View File

@@ -0,0 +1,21 @@
const generatePhotos = (number: number, startId: number) => {
const photos = [];
for (let i = 0; i < number; i++) {
const id = startId + i;
const width = 200 + Math.floor(Math.random() * 200);
const height = 200 + Math.floor(Math.random() * 200);
photos.push({
id,
src: `https://picsum.photos/id/${id}/${width}/${height}`,
alt: `Photo ${id}`,
width,
height,
});
}
return photos;
};
export default generatePhotos;