Skip to content

Commit

Permalink
fix surah ui
Browse files Browse the repository at this point in the history
  • Loading branch information
cglotr committed May 15, 2024
1 parent 14cdc43 commit 96a5f1c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
1 change: 0 additions & 1 deletion src/pages/bookmark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ export default function BookmarkPage() {
</Head>
<div
style={{
fontSize: FONT.FONT_SIZE_S,
display: "flex",
justifyContent: "space-between"
}}
Expand Down
18 changes: 4 additions & 14 deletions src/pages/favs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,12 @@ export default function FavsPage() {
return (
<div
style={{
fontSize: FONT.FONT_SIZE_S,
display: "flex",
justifyContent: "flex-end"
}}
>
<div
style={{
display: "flex",
justifyContent: "flex-end"
}}
>
{renderShowHideVerse()}
{renderShowHideTranslation()}
</div>
<Break />
{renderShowHideVerse()}
{renderShowHideTranslation()}
</div>
)
}
Expand Down Expand Up @@ -125,9 +118,6 @@ export default function FavsPage() {
onClick={() => {
router.push(`/surahs/${parsed.surah}#${parsed.verse}`)
}}
style={{
fontSize: FONT.FONT_SIZE_S,
}}
>
{surahVerse}
</Button>
Expand Down
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const IndexPage: NextPage<InferGetStaticPropsType<typeof getStaticProps>> = (pro
style={{
display: "flex",
justifyContent: "space-between",
fontSize: FONT.FONT_SIZE_S
}}
>
{
Expand Down
31 changes: 18 additions & 13 deletions src/pages/surahs/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ export default function SurahPage(props: { surah: Surah }) {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
fontSize: FONT.FONT_SIZE_S
}}
>
<div>
{`${props.surah.surahId}:${verse.verseId}`}
</div>
<div>
{renderShowHideVerse()}
{renderShowHideTranslation()}
{
authContext.isLoggedIn() ?
renderFav(`${props.surah.surahId}:${verse.verseId}`)
Expand Down Expand Up @@ -178,18 +175,25 @@ export default function SurahPage(props: { surah: Surah }) {
return (
<div
style={{
fontSize: FONT.FONT_SIZE_S
display: "flex",
justifyContent: "space-between"
}}
>
<div
style={{
display: "flex",
justifyContent: "space-between"
}}
>
{renderButtons()}
</div>
<Break />
{renderButtons()}
</div>
)
}

const renderUserActions = () => {
return (
<div
style={{
display: "flex",
justifyContent: "flex-end"
}}
>
{renderShowHideVerse()}
{renderShowHideTranslation()}
</div>
)
}
Expand All @@ -206,6 +210,7 @@ export default function SurahPage(props: { surah: Surah }) {
paddingRight: `${DIMENSIONS.SZ_6}px`
}}
>
{renderUserActions()}
{renderVerses()}
</div>
</>
Expand Down

0 comments on commit 96a5f1c

Please sign in to comment.