Run 'rake format:eslint:apply'
This commit is contained in:
parent
bd04a26a4a
commit
f80e6eb564
3 changed files with 28 additions and 8 deletions
|
@ -8,12 +8,11 @@ The project is still in the early stages of development.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
The following languages and tools have to be
|
The following languages have to be installed to build
|
||||||
installed to build the website from source:
|
the website from source:
|
||||||
|
|
||||||
* Ruby 3.2 (or later)
|
* Ruby 3.2 (or later)
|
||||||
* NodeJS v18.15 (or later)
|
* NodeJS v18.15 (or later)
|
||||||
* [tidy-html5](https://github.com/htacg/tidy-html5)
|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ export function SurahStream({ surahId, localeId, t }: Props) {
|
||||||
const [theme, setTheme] = useTheme();
|
const [theme, setTheme] = useTheme();
|
||||||
|
|
||||||
const locale = Quran.locales[localeId];
|
const locale = Quran.locales[localeId];
|
||||||
const surah = Quran.surahs[localeId][parseInt(surahId) - 1]
|
const surah = Quran.surahs[localeId][parseInt(surahId) - 1];
|
||||||
const rootRef = useRef<HTMLElement>(null);
|
const rootRef = useRef<HTMLElement>(null);
|
||||||
const audio = useMemo(() => new Audio(), []);
|
const audio = useMemo(() => new Audio(), []);
|
||||||
const readyToRender = stream.length > 0;
|
const readyToRender = stream.length > 0;
|
||||||
|
|
|
@ -27,9 +27,30 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
return () => {
|
return () => {
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<SurahIndex path="/" locale={Quran.locales["en"]} surahs={Quran.surahs["en"]} t={t} />
|
<SurahIndex
|
||||||
<SurahIndex path="/en" locale={Quran.locales["en"]} surahs={Quran.surahs["en"]} t={t} />
|
path="/"
|
||||||
<SurahIndex path="/ar" locale={Quran.locales["ar"]} surahs={Quran.surahs["ar"]} t={t} />
|
locale={Quran.locales["en"]}
|
||||||
|
surahs={Quran.surahs["en"]}
|
||||||
|
t={t}
|
||||||
|
/>
|
||||||
|
<SurahIndex
|
||||||
|
path="/en"
|
||||||
|
locale={Quran.locales["en"]}
|
||||||
|
surahs={Quran.surahs["en"]}
|
||||||
|
t={t}
|
||||||
|
/>
|
||||||
|
<SurahIndex
|
||||||
|
path="/ar"
|
||||||
|
locale={Quran.locales["ar"]}
|
||||||
|
surahs={Quran.surahs["ar"]}
|
||||||
|
t={t}
|
||||||
|
/>
|
||||||
|
<SurahIndex
|
||||||
|
path="/fa"
|
||||||
|
locale={Quran.locales["fa"]}
|
||||||
|
surahs={Quran.surahs["fa"]}
|
||||||
|
t={t}
|
||||||
|
/>
|
||||||
<SurahStream path="/:localeId/:surahId" t={t} />
|
<SurahStream path="/:localeId/:surahId" t={t} />
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue