image link URL format changed

This commit is contained in:
Vidhya 2026-07-20 23:10:21 +05:30
parent adf67b76c0
commit 53c7ea0c80
2 changed files with 7 additions and 7 deletions

View File

@ -51,8 +51,8 @@ const CreateEventGalleryForm: React.FC<EditEventFormProps> = ({ eventId }) => {
if (link.includes("drive.google.com")) { if (link.includes("drive.google.com")) {
const match = link.match(/\/d\/([a-zA-Z0-9_-]+)/) || link.match(/id=([a-zA-Z0-9_-]+)/); const match = link.match(/\/d\/([a-zA-Z0-9_-]+)/) || link.match(/id=([a-zA-Z0-9_-]+)/);
if (match && match[1]) { if (match && match[1]) {
return `https://drive.google.com/thumbnail?id=${match[1]}&sz=w1000-h1000`; return `https://drive.google.com/uc?export=view&id=${match[1]}`;
} }
} }
return link; return link;
}); });

View File

@ -27,11 +27,11 @@ const ListOfEvents = () => {
try { try {
const cookies = new Cookies(); const cookies = new Cookies();
const token = cookies.get('token'); const token = cookies.get('token');
if (!token) { // if (!token) {
// No token: redirect to login // // No token: redirect to login
router.push('/login'); // router.push('/login');
return; // return;
} // }
const eventRes: any = await axios.get(buildApiUrl('events'), { const eventRes: any = await axios.get(buildApiUrl('events'), {
headers: { Authorization: `Bearer ${token}` }, headers: { Authorization: `Bearer ${token}` },
}); });