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