redirect to Al-Kahf if today's Friday

This commit is contained in:
Gyen Abubakar 2022-11-11 18:15:31 +00:00 committed by Robert
parent 5e2ab86e22
commit eb724a14b4

View file

@ -1,7 +1,11 @@
import { getLocale } from 'lib/locales';
import { getLocale } from "lib/locales";
(function () {
const surahId: number = Math.ceil(Math.random() * 114);
let surahId: number = Math.ceil(Math.random() * 114);
const locale: string = getLocale();
const day = new Date().getDay();
if (day === 5) surahId = 18;
location.replace(`/${locale}/${surahId}`);
})();