image link URL format changed
This commit is contained in:
parent
adf67b76c0
commit
53c7ea0c80
@ -51,8 +51,8 @@ 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;
|
||||
});
|
||||
|
||||
@ -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}` },
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user