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,7 +51,7 @@ const CreateEventGalleryForm: React.FC<EditEventFormProps> = ({ eventId }) => {
if (link.includes("drive.google.com")) {
const match = link.match(/\/d\/([a-zA-Z0-9_-]+)/) || link.match(/id=([a-zA-Z0-9_-]+)/);
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;

View File

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