Rename route var

This commit is contained in:
0x1eef 2024-10-18 19:53:41 -03:00
parent 18aa5eba08
commit 0a5a1dcd39
2 changed files with 4 additions and 4 deletions

View file

@ -1,10 +1,10 @@
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 href = `/${locale}/${randomId + 1}`;
const href = `/${localeId}/${randomId + 1}`;
const ref = useRef();
useEffect(() => {

View file

@ -52,7 +52,7 @@ const Main = (function () {
t={t}
/>
<SurahStream path="/:localeId/:surahId" t={t} />
<RandomSurah path="/:locale/random" />
<RandomSurah path="/:localeId/random" />
</Router>
);
};