From 441b3085fab7f0c83e8eb2df388661d6e18c0120 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Mon, 1 Aug 2022 18:13:53 -0500 Subject: WiP parsing of office hours --- src/models/PeerTeacher.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/models/PeerTeacher.ts') diff --git a/src/models/PeerTeacher.ts b/src/models/PeerTeacher.ts index 9069069..7fee179 100644 --- a/src/models/PeerTeacher.ts +++ b/src/models/PeerTeacher.ts @@ -101,6 +101,8 @@ export default class PeerTeacher { return total_hours; } + // The public URL for displaying an an image on Google Drive has to be in this format + // This function simply replaces everthing before '=' with '' get drive_pic(): string { if (this.prof_pic_url == null || this.prof_pic_url == undefined) return "" return `https://drive.google.com/uc?export=view&id=${this.prof_pic_url.replace(/^[^=]*=/, '')}`; -- cgit v1.2.3