Fix typo
This commit is contained in:
parent
e802d6ef19
commit
fd4eb1e409
4 changed files with 45 additions and 43 deletions
|
@ -1,12 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title></title>
|
<title>The Noble Quran</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
<script src="/js/index.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="app mount root h-full"></div>
|
<div class="app mount root h-full"></div>
|
||||||
|
<script src="/js/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -15,6 +15,11 @@ export function LanguageSelect({
|
||||||
setActiveLocale,
|
setActiveLocale,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const locales = Object.values(Quran.locales);
|
const locales = Object.values(Quran.locales);
|
||||||
|
|
||||||
|
if (!activeLocale) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
value={activeLocale.name}
|
value={activeLocale.name}
|
||||||
|
|
|
@ -52,7 +52,7 @@ export function SurahIndex({ locale, surahs, t }: Props) {
|
||||||
<LanguageSelect
|
<LanguageSelect
|
||||||
isOpen={showLangDropdown}
|
isOpen={showLangDropdown}
|
||||||
setIsOpen={setShowLangDropdown}
|
setIsOpen={setShowLangDropdown}
|
||||||
locale={activeLocale}
|
activeLocale={activeLocale}
|
||||||
setActiveLocale={setActiveLocale}
|
setActiveLocale={setActiveLocale}
|
||||||
/>
|
/>
|
||||||
<ThemeSelect
|
<ThemeSelect
|
||||||
|
|
|
@ -9,7 +9,7 @@ import classNames from "classnames";
|
||||||
import { Router } from "preact-router";
|
import { Router } from "preact-router";
|
||||||
import "core-js";
|
import "core-js";
|
||||||
|
|
||||||
const exports = {
|
const globals = {
|
||||||
Quran,
|
Quran,
|
||||||
React,
|
React,
|
||||||
render,
|
render,
|
||||||
|
@ -19,9 +19,8 @@ const exports = {
|
||||||
useRef,
|
useRef,
|
||||||
classNames,
|
classNames,
|
||||||
};
|
};
|
||||||
Object.assign(window, exports);
|
Object.assign(window, globals);
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
const Main = (function () {
|
const Main = (function () {
|
||||||
const t = T(require("@json/t.json"));
|
const t = T(require("@json/t.json"));
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -56,6 +55,4 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
render(<Main />, document.querySelector(".mount"));
|
render(<Main />, document.querySelector(".mount"));
|
||||||
});
|
|
||||||
|
|
Loading…
Reference in a new issue