various changes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user