Rename route var
This commit is contained in:
parent
18aa5eba08
commit
0a5a1dcd39
2 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
type Props = {
|
type Props = {
|
||||||
locale: string;
|
localeId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function RandomSurah({ locale }: Props) {
|
export function RandomSurah({ localeId }: Props) {
|
||||||
const randomId = Math.floor(Math.random() * Quran.surahs.length);
|
const randomId = Math.floor(Math.random() * Quran.surahs.length);
|
||||||
const href = `/${locale}/${randomId + 1}`;
|
const href = `/${localeId}/${randomId + 1}`;
|
||||||
const ref = useRef();
|
const ref = useRef();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -52,7 +52,7 @@ const Main = (function () {
|
||||||
t={t}
|
t={t}
|
||||||
/>
|
/>
|
||||||
<SurahStream path="/:localeId/:surahId" t={t} />
|
<SurahStream path="/:localeId/:surahId" t={t} />
|
||||||
<RandomSurah path="/:locale/random" />
|
<RandomSurah path="/:localeId/random" />
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue