-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from Front-End-Coders-Mauritius/137-move-to-n…
…uxt3 move to nuxt3
- Loading branch information
Showing
126 changed files
with
13,982 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
// A snippet to start vue 3 file with script setup at the top with ts and a template tag | ||
"Vue 3 with script setup": { | ||
"scope": "vue", | ||
"prefix": "vtpl", | ||
"body": [ | ||
"<script setup lang=\"ts\">", | ||
" $1", | ||
"</script>", | ||
"", | ||
"<template>", | ||
" <div>", | ||
" $2", | ||
" </div>", | ||
"</template>", | ||
"", | ||
], | ||
"description": "Vue 3 with script setup" | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[ | ||
{ | ||
"username": "MrSunshyne", | ||
"contributions": 540 | ||
}, | ||
{ | ||
"username": "houzyk", | ||
"contributions": 30 | ||
}, | ||
{ | ||
"username": "nicolasstrands", | ||
"contributions": 25 | ||
}, | ||
{ | ||
"username": "mahima98", | ||
"contributions": 21 | ||
}, | ||
{ | ||
"username": "kushul", | ||
"contributions": 19 | ||
}, | ||
{ | ||
"username": "derecklhw", | ||
"contributions": 16 | ||
}, | ||
{ | ||
"username": "Saamiyah", | ||
"contributions": 13 | ||
}, | ||
{ | ||
"username": "cedpoilly", | ||
"contributions": 13 | ||
}, | ||
{ | ||
"username": "Aurazor", | ||
"contributions": 12 | ||
}, | ||
{ | ||
"username": "danshilm", | ||
"contributions": 7 | ||
}, | ||
{ | ||
"username": "arwinneil", | ||
"contributions": 5 | ||
}, | ||
{ | ||
"username": "damevin", | ||
"contributions": 5 | ||
}, | ||
{ | ||
"username": "Luvnish", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"username": "fluxynet", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"username": "yaasir007", | ||
"contributions": 1 | ||
}, | ||
{ | ||
"username": "k3ii", | ||
"contributions": 1 | ||
} | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export const people = [ | ||
{ | ||
name: "Sandeep Ramgolam", | ||
role: "Lead Organiser", | ||
imageUrl: "https://github.com/MrSunshyne.png", | ||
id: "6a23b471-4829-44cf-bf85-7ecd955c7c3a", | ||
}, | ||
{ | ||
name: "Kushul Soomaree", | ||
role: "Co-Organiser", | ||
imageUrl: "https://github.com/kushul.png", | ||
id: "5c852db3-4844-4f6d-b6fe-c135963441fb", | ||
}, | ||
{ | ||
name: "Michaël Jules", | ||
role: "Active Community Member", | ||
imageUrl: "https://github.com/mgjules.png", | ||
id: "d746a55d-bd48-495a-a7af-de65cf067a6c", | ||
}, | ||
{ | ||
name: "Mahima Ramgolam", | ||
role: "Active Community Member", | ||
imageUrl: "https://github.com/mahima98.png", | ||
id: "77031f3f-3f2c-4306-802f-3f8b55fd30d8", | ||
}, | ||
{ | ||
name: "Saamiyah Peerun", | ||
role: "Active Community Member", | ||
imageUrl: "https://github.com/saamiyah.png", | ||
id: "78966047-4716-4afc-856e-46f1430974ed", | ||
}, | ||
{ | ||
name: "Cedric Poilly", | ||
role: "Active Community Member", | ||
imageUrl: "https://github.com/cedpoilly.png", | ||
id: "549be7b0-1e7d-4deb-9fb3-273cfe0da5b0", | ||
}, | ||
{ | ||
name: "Noor Joomun", | ||
role: "Collaborator", | ||
imageUrl: "https://github.com/joomun.png", | ||
id: "", | ||
}, | ||
{ | ||
name: "Dereck Lam Hon Wah", | ||
role: "Collaborator", | ||
imageUrl: "https://github.com/derecklhw.png", | ||
id: "", | ||
}, | ||
]; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"id":"d746a55d-bd48-495a-a7af-de65cf067a6c","status":"published","sort":null,"date_created":"2022-09-23T11:30:46.831Z","date_updated":"2023-08-23T07:11:18.058Z","name":"Michaël Jules","github_account":"mgjules","featured":false},{"id":"6a23b471-4829-44cf-bf85-7ecd955c7c3a","status":"published","sort":null,"date_created":"2022-09-23T11:36:00.306Z","date_updated":"2023-06-13T18:47:05.094Z","name":"Sandeep Ramgolam","github_account":"MrSunshyne","featured":true},{"id":"77031f3f-3f2c-4306-802f-3f8b55fd30d8","status":"published","sort":null,"date_created":"2022-09-28T16:28:39.745Z","date_updated":"2023-06-13T17:09:59.415Z","name":"Mahima Ramgolam","github_account":"mahima98","featured":false},{"id":"78966047-4716-4afc-856e-46f1430974ed","status":"published","sort":null,"date_created":"2022-10-01T08:11:52.142Z","date_updated":"2023-07-16T12:52:11.922Z","name":"Saamiyah Peerun","github_account":"saamiyah","featured":true},{"id":"f7eb0e27-0c93-4510-bdf5-f7fbdd0f08fd","status":"published","sort":null,"date_created":"2022-10-01T08:14:38.350Z","date_updated":"2022-10-01T09:55:51.306Z","name":"Jordan Bienvenue","github_account":"JordanBienvenue","featured":false},{"id":"52aff2d6-72ba-463d-9167-ede949779467","status":"published","sort":null,"date_created":"2022-10-01T08:14:38.413Z","date_updated":"2022-10-01T09:43:51.721Z","name":"Arwin Neil Baichoo","github_account":"arwinneil","featured":false},{"id":"48f703bf-f8f2-4cd7-b199-104fe4e4e859","status":"published","sort":null,"date_created":"2022-10-01T08:14:38.461Z","date_updated":"2022-10-01T09:43:17.948Z","name":"Percy Mamedy","github_account":"percymamedy","featured":false},{"id":"3cb79854-9e08-495c-8bb6-5328dce46de8","status":"published","sort":null,"date_created":"2022-10-01T08:14:38.499Z","date_updated":"2022-10-01T09:41:08.663Z","name":"Renghen","github_account":"renghen","featured":false},{"id":"68619609-3b4c-442e-bfb0-2c34b51261e1","status":"published","sort":null,"date_created":"2022-10-01T08:14:38.560Z","date_updated":"2022-10-01T09:51:53.105Z","name":"Abdur-Rahmaan Janhangeer","github_account":"Abdur-rahmaanJ","featured":false},{"id":"957243ad-4fca-4480-820d-3c1cc89980d1","status":"published","sort":null,"date_created":"2022-10-01T08:16:20.022Z","date_updated":"2023-06-13T18:46:59.795Z","name":"Ish Sookun","github_account":"ishwon","featured":false},{"id":"17e2c01c-10d4-438a-b936-3086ec8f70fb","status":"published","sort":null,"date_created":"2022-10-01T08:16:20.119Z","date_updated":"2022-10-02T09:53:32.868Z","name":"Ravish Dussaruth","github_account":"ravishdussaruth","featured":false},{"id":"57b2a446-a80d-4494-bcdd-aea6d210c9a7","status":"published","sort":null,"date_created":"2022-10-01T08:16:20.210Z","date_updated":"2022-10-01T09:57:11.984Z","name":"Muhammad Yusuf AbdoolSatar","github_account":"fluxynet","featured":false},{"id":"5c852db3-4844-4f6d-b6fe-c135963441fb","status":"published","sort":null,"date_created":"2022-10-01T08:17:29.489Z","date_updated":"2023-04-30T08:56:13.417Z","name":"Kushul Soomaree","github_account":"kushul","featured":true},{"id":"e577be8a-24e3-4299-a500-ec1611065a63","status":"published","sort":null,"date_created":"2022-10-01T08:17:29.524Z","date_updated":"2022-10-01T09:55:13.065Z","name":"Kherin Bundhoo","github_account":"kherin","featured":false},{"id":"2ba498f2-3dd5-4b15-a4f5-37925e264545","status":"published","sort":null,"date_created":"2022-10-01T08:19:26.402Z","date_updated":"2023-05-11T04:08:35.370Z","name":"Zeeshan Maudar","github_account":"ZeeshaanMaudar","featured":false},{"id":"549be7b0-1e7d-4deb-9fb3-273cfe0da5b0","status":"published","sort":null,"date_created":"2022-10-01T08:22:04.037Z","date_updated":"2023-08-23T07:11:01.934Z","name":"Cedric Poilly","github_account":"cedpoilly","featured":true},{"id":"e39a7983-89be-4c3c-b5b0-9969f19af5d5","status":"published","sort":null,"date_created":"2022-10-01T08:25:34.529Z","date_updated":"2022-10-01T09:54:43.765Z","name":"Christophe Ramsamy","github_account":"kyushiro","featured":false},{"id":"60c638fd-2676-4a3b-a697-0c002752349e","status":"published","sort":null,"date_created":"2022-10-01T08:25:34.601Z","date_updated":"2022-10-01T09:51:15.739Z","name":"Joshua Iwugod","github_account":"iwugod","featured":false},{"id":"5f0487f2-0c50-4f94-a2e5-9f44dcc8a63b","status":"published","sort":null,"date_created":"2022-10-01T08:31:38.319Z","date_updated":"2022-10-01T09:50:25.012Z","name":"Pritvi Jheengut","github_account":"Jheengut","featured":false},{"id":"d486aa6f-c36d-4b51-8265-b4b8380c535b","status":"published","sort":null,"date_created":"2022-10-01T08:33:25.361Z","date_updated":"2022-10-01T09:53:41.313Z","name":"Humeira Diljore","github_account":"Humeira","featured":false},{"id":"5e8aa828-4cd7-4706-9b4e-48965a3c66a6","status":"published","sort":null,"date_created":"2022-10-01T08:33:25.446Z","date_updated":"2022-10-02T09:33:38.198Z","name":"Bilkiss Dulloo","github_account":"Bilkiss","featured":false},{"id":"3d6dcee8-6bdf-446c-a101-a9c5d1b03c52","status":"published","sort":null,"date_created":"2022-10-01T08:36:23.017Z","date_updated":"2022-10-02T09:18:47.563Z","name":"Rahul Thakoor","github_account":"rahul-thakoor","featured":false},{"id":"d9212ff7-c4f2-43bf-84c7-1aca3148f29b","status":"published","sort":null,"date_created":"2022-10-02T09:25:25.372Z","date_updated":null,"name":"Umar Waliyullah","github_account":"umarmw","featured":false},{"id":"4801ac4b-ba59-4f87-85d9-686638323e20","status":"published","sort":null,"date_created":"2022-10-02T09:25:25.464Z","date_updated":null,"name":"David Dias","github_account":"thedaviddias","featured":false},{"id":"162caf0d-1e02-4cf3-bf74-a0b4d7995a1a","status":"published","sort":null,"date_created":"2022-10-04T16:35:34.747Z","date_updated":"2023-05-08T19:17:50.048Z","name":"Aditya Bholah","github_account":"reallyaditya","featured":false},{"id":"0dcd5e35-fe88-4b74-8f20-fea7638f655c","status":"published","sort":null,"date_created":"2022-10-07T08:31:00.271Z","date_updated":"2023-06-13T18:46:28.468Z","name":"Adarsh Hasnah","github_account":"adarshasnah","featured":false},{"id":"c5eb2564-b980-4d7c-bbff-941e34667c46","status":"published","sort":null,"date_created":"2023-01-28T11:33:09.152Z","date_updated":"2023-05-11T04:08:59.973Z","name":" Mervyn Manilall","github_account":"mervynmanilall","featured":false},{"id":"2af3f3bb-0de2-45a2-bd31-a452c85db2da","status":"published","sort":null,"date_created":"2023-01-31T09:53:34.796Z","date_updated":null,"name":"Abdallah Yashir Ramsing","github_account":"abdallahYashir","featured":false},{"id":"643c2c08-f9d4-49fd-af24-c343666c65a2","status":"published","sort":null,"date_created":"2023-03-07T08:14:00.821Z","date_updated":"2023-03-07T09:55:26.456Z","name":"Hoolan Naipal","github_account":"Hoolan01","featured":false},{"id":"9a9739d6-3cf8-44a6-8fd1-4250d9fd4db6","status":"published","sort":null,"date_created":"2023-03-07T08:14:00.865Z","date_updated":null,"name":"Kenny Oozageer","github_account":null,"featured":false},{"id":"3e8c6183-ffd0-4804-a77a-0759a0ecdcb8","status":"published","sort":null,"date_created":"2023-03-07T08:14:00.902Z","date_updated":null,"name":"Sandy Ramiah","github_account":"sandyr26","featured":false},{"id":"9005be8f-1adb-495c-b38e-7191ffea2b3b","status":"published","sort":null,"date_created":"2023-04-07T04:08:59.599Z","date_updated":"2023-07-16T12:51:19.846Z","name":"Luisa Bruno","github_account":"luvibruno","featured":false},{"id":"e026a691-6949-4810-b3fb-23eef22e8b8a","status":"published","sort":null,"date_created":"2023-04-10T10:06:46.237Z","date_updated":null,"name":"Nayar Joolfoo","github_account":"Nayar","featured":false},{"id":"29e94235-a4c9-43eb-a764-5c07ba4a94e1","status":"published","sort":null,"date_created":"2023-04-27T09:06:18.397Z","date_updated":null,"name":"Asma Dinat","github_account":null,"featured":false},{"id":"8e468b6a-2ec0-42e9-8502-f7a46472184a","status":"published","sort":null,"date_created":"2023-06-13T16:00:32.256Z","date_updated":"2023-08-23T07:10:44.424Z","name":"Francis Kikulwe","github_account":"franc15","featured":false},{"id":"5c47169a-5073-47c8-8fc7-efbd4fe82e0d","status":"published","sort":null,"date_created":"2023-06-13T16:06:12.553Z","date_updated":"2024-01-28T21:14:33.467Z","name":"Houzair Koussa","github_account":"houzyk","featured":false},{"id":"de80a68d-a823-49e8-9b97-f66e8cb5c122","status":"published","sort":null,"date_created":"2023-06-13T17:09:49.258Z","date_updated":"2023-07-16T12:51:58.021Z","name":"Arvind Tacouri","github_account":"luvnish","featured":false},{"id":"13680b6f-590f-4d04-b056-f98ab33ea851","status":"published","sort":null,"date_created":"2023-06-14T06:34:22.252Z","date_updated":null,"name":"Bernard Joseph Jean Bruno","github_account":"eznix86","featured":false},{"id":"f3d21269-f296-4f19-9875-940e889fa4d6","status":"published","sort":null,"date_created":"2023-08-04T18:23:28.265Z","date_updated":"2023-08-08T19:08:53.917Z","name":"Nicolas Strands","github_account":"nicolasstrands","featured":false},{"id":"574ce0d7-5c11-40aa-87f3-da1275295b4e","status":"published","sort":null,"date_created":"2023-08-08T12:26:08.106Z","date_updated":null,"name":"Jeshta Bhoyedhur","github_account":"jjeshta","featured":false},{"id":"1e6593d9-52ad-4acf-a21c-bf6bcfb7f290","status":"published","sort":null,"date_created":"2023-08-08T19:08:40.068Z","date_updated":"2024-01-28T21:14:24.507Z","name":"Alberto De Santis","github_account":"hallede","featured":false},{"id":"3be36def-6bfa-46a9-8a15-7b111554d041","status":"published","sort":null,"date_created":"2023-09-08T17:38:18.768Z","date_updated":null,"name":"Jain Ramchurn","github_account":"k3ii","featured":false},{"id":"a17bf7fa-e3ab-485a-9f28-06dfd5ecf89b","status":"published","sort":null,"date_created":"2023-11-07T12:11:03.538Z","date_updated":null,"name":"Alexandre Bissessur","github_account":"xelab04","featured":false},{"id":"1268900f-f172-42a7-b075-036854c9daff","status":"published","sort":null,"date_created":"2023-11-13T20:04:57.285Z","date_updated":"2023-11-15T18:13:26.442Z","name":"Ankshita Maunthrooa","github_account":"ankshita02","featured":false},{"id":"bc11cc62-c222-486d-9b91-b027a3d4e8d5","status":"published","sort":null,"date_created":"2024-01-28T21:12:49.543Z","date_updated":"2024-01-29T16:18:49.550Z","name":"Mootien Kasarajen","github_account":"MKov-KM","featured":true},{"id":"1b0b22bd-0d92-4328-8d62-0f8468485e5e","status":"published","sort":null,"date_created":"2024-01-28T21:12:49.563Z","date_updated":null,"name":"Dereck Lam Hon Wah","github_account":"derecklhw","featured":true},{"id":"54bb93e4-69ab-49ab-ad7f-38e5b77e95e8","status":"published","sort":null,"date_created":"2024-03-21T07:18:23.490Z","date_updated":null,"name":"Raphaël Damevin","github_account":"damevin","featured":false},{"id":"5d30d503-4004-4e58-9435-b6a9dabd510f","status":"published","sort":null,"date_created":"2024-04-02T07:10:35.191Z","date_updated":null,"name":"Anand Ramrooch","github_account":"AnandR362","featured":false},{"id":"2ad46b69-87c0-4bd8-abf7-e4ca012906a2","status":"published","sort":null,"date_created":"2024-04-02T09:14:10.221Z","date_updated":null,"name":"Farhanaaz Curumthaullee","github_account":"Farhanaaz2805","featured":false},{"id":"e7609fa2-1ddf-4f57-91e2-f1cfe147b7d5","status":"published","sort":null,"date_created":"2024-04-10T10:50:37.906Z","date_updated":"2024-04-10T10:52:31.057Z","name":"Ruben Pillay Vurdapen","github_account":"Rubenvur","featured":false},{"id":"3166bf91-55ac-4702-a868-845b97bd9c29","status":"published","sort":null,"date_created":"2024-04-29T09:23:09.546Z","date_updated":null,"name":"Khali Lame","github_account":"khalibloo","featured":false},{"id":"047afcba-d49f-4c36-9d59-6619f1fae27f","status":"published","sort":null,"date_created":"2024-04-29T14:09:09.123Z","date_updated":null,"name":"Gaël Latouche ","github_account":"Ga-L","featured":false},{"id":"51410062-a881-4c0a-8b93-687175a74e0b","status":"published","sort":null,"date_created":"2024-04-30T13:54:50.826Z","date_updated":null,"name":"Chervine Bhiwoo","github_account":"chervineb","featured":false}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const sponsors = [ | ||
{ | ||
title: "Website Sponsor", | ||
description: | ||
"Having an online presence is not free. We pay for a domain name yearly and we are grateful for the support of our website sponsors.", | ||
sponsors: [ | ||
{ | ||
name: "Upcode.mu", | ||
sponsorUrl: "https://upcode.mu", | ||
logo: "logo-upcode.svg", | ||
description: "Domain Name", | ||
}, | ||
{ | ||
name: "Cloud.mu", | ||
sponsorUrl: "https://cloud.mu", | ||
logo: "logo-cloud_mu.svg", | ||
description: "Hosting", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Goodies Sponsors", | ||
description: | ||
"Goodies are a great way to show your appreciation to our speakers and attendees.", | ||
sponsors: [ | ||
{ | ||
name: "Jetbrains", | ||
sponsorUrl: "https://www.jetbrains.com/", | ||
logo: "jetbrains.svg", | ||
description: "Licenses for raffles", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "Partner", | ||
description: | ||
"Goodies are a great way to show your appreciation to our speakers and attendees.", | ||
sponsors: [ | ||
{ | ||
name: "JSNation", | ||
sponsorUrl: "https://www.jsnation.com/", | ||
logo: "gitnation_jsnation_dark.png", | ||
description: "Conference Tickets & Discounts", | ||
}, | ||
{ | ||
name: "VueJS London", | ||
sponsorUrl: "https://vuejslive.com/", | ||
logo: "gitnation_vuejslondon.png", | ||
description: "Conference Tickets & Discounts", | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export default sponsors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@frontend.mu/data", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "node ./scripts/pre-run", | ||
"update-contributors": "node ./scripts/update-contributors.js" | ||
}, | ||
"dependencies": { | ||
"@nuxtjs/color-mode": "^3.3.3", | ||
"nuxt": "^3.11.2", | ||
"vue": "^3.4.21", | ||
"vue-router": "^4.3.0" | ||
}, | ||
"devDependencies": { | ||
"@nuxtjs/tailwindcss": "^6.12.0", | ||
"nuxt-icon": "^0.6.10" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { createDirectus, rest } from '@directus/sdk'; | ||
|
||
const getDirectusClient = async () => { | ||
// const directus = new Directus(); | ||
const client = createDirectus('https://directus.frontend.mu').with(rest()); | ||
return client; | ||
}; | ||
|
||
export default getDirectusClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
import getDirectusClient from "./directus-client.js"; | ||
import { readItems } from '@directus/sdk'; | ||
import Memoize from "./memoizer.js" | ||
|
||
// Events | ||
async function loadEventsUncached() { | ||
|
||
const client = await getDirectusClient(); | ||
|
||
const events = await client.request( | ||
readItems("Events", | ||
{ | ||
fields: ["*.*", "sessions.Events_id.*", "sessions.Session_id.speakers.name", "sessions.Session_id.title", "sessions.Session_id.speakers.id", "sessions.Session_id.speakers.github_account", "sponsors.Sponsor_id.*.*"], | ||
} | ||
)); | ||
|
||
return events; | ||
} | ||
|
||
const loadEvents = Memoize(loadEventsUncached); | ||
|
||
// Speakers | ||
async function loadSpeakersUncached() { | ||
const client = await getDirectusClient(); | ||
const speaker = await client.request( | ||
readItems("Person", { | ||
fields: ["*.*.*"], | ||
}) | ||
); | ||
|
||
return speaker; | ||
} | ||
|
||
const loadSpeakers = Memoize(loadSpeakersUncached); | ||
|
||
// Photo albums | ||
const photoAlbumSource = "https://raw.githubusercontent.com/Front-End-Coders-Mauritius/google-photos-sync/main/"; | ||
async function loadPhotosUncached() { | ||
let albumsPhotos = await fetch(`${photoAlbumSource}index.json`); | ||
albumsPhotos = await albumsPhotos.json(); | ||
|
||
return albumsPhotos; | ||
} | ||
|
||
const getPhotos = Memoize(loadPhotosUncached); | ||
|
||
export { loadEvents, loadSpeakers, getPhotos }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
function Memoize(f) { | ||
let cache = {}; | ||
return async function () { | ||
let hash; | ||
|
||
switch (arguments.length) { | ||
case 0: | ||
hash = null; | ||
break; | ||
case 1: | ||
hash = arguments[0]; | ||
break; | ||
default: | ||
hash = Array.from(arguments).join("|"); | ||
} | ||
|
||
if (Object.prototype.hasOwnProperty.call(cache, hash)) { | ||
return cache[hash]; | ||
} | ||
|
||
try { | ||
cache[hash] = await f(...arguments); | ||
} catch (e) { | ||
console.warn(e); | ||
} | ||
|
||
return cache[hash]; | ||
} | ||
} | ||
|
||
export default Memoize; |
Oops, something went wrong.