various changes

This commit is contained in:
2025-08-09 07:10:04 -04:00
parent fbd342c6a7
commit 21796e768e
20 changed files with 886 additions and 342 deletions

View File

@@ -2,7 +2,6 @@ import { useEffect, useState, useRef, useCallback } from "react";
import { ProgressSpinner } from 'primereact/progressspinner';
import { Dialog } from 'primereact/dialog';
import { Image } from 'primereact/image';
import { toast } from 'react-toastify';
import { API_URL } from '../config';
const MEME_API_URL = `${API_URL}/memes/list_memes`;
@@ -43,8 +42,8 @@ const Memes = () => {
const imageObjects = newMemes.map(m => ({
id: m.id,
timestamp: new Date(m.timestamp * 1000)
.toString().split(" ")
.splice(0, 4).join(" "),
.toString().split(" ")
.splice(0, 4).join(" "),
url: `${BASE_IMAGE_URL}/${m.id}.png`,
}));
@@ -118,14 +117,14 @@ const Memes = () => {
src={selectedImage.url}
alt={`meme-${selectedImage.id}`}
style={{
maxWidth: '100%',
maxHeight: '70vh', // restrict height to viewport height
objectFit: 'contain',
display: 'block',
margin: '0 auto',
borderRadius: '6px',
maxWidth: '100%',
maxHeight: '70vh', // restrict height to viewport height
objectFit: 'contain',
display: 'block',
margin: '0 auto',
borderRadius: '6px',
}}
/>
/>
)}
</Dialog>