diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 8d810aa..d72b765 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -14,6 +14,22 @@ const Footer = () => {

+ + + + + { -const [theme, setTheme] = useContext(ThemeContext); -const root = window.document.documentElement; -let storageTheme = JSON.parse(localStorage.getItem("theme")) + const [theme, setTheme] = useContext(ThemeContext); + const root = window.document.documentElement; + let storageTheme = JSON.parse(localStorage.getItem("theme")); - const handleTheme = () => { - if(storageTheme.theme == "light"){ - setTheme("dark"); - localStorage.setItem( - "theme", - JSON.stringify({ - theme:"dark", - key: "201273891793871263120" - }) - ) - root.classList.remove('light'); - root.classList.add("dark"); - } else if (storageTheme.theme == "dark") { - setTheme("light"); - localStorage.setItem( - "theme", - JSON.stringify({ - theme:"light", - key: "231273891793871263123" - }) - ) - root.classList.remove('dark'); - root.classList.add("light"); - } - } + const handleTheme = () => { + if (storageTheme.theme == "light") { + setTheme("dark"); + localStorage.setItem( + "theme", + JSON.stringify({ + theme: "dark", + key: "201273891793871263120", + }) + ); + root.classList.remove("light"); + root.classList.add("dark"); + } else if (storageTheme.theme == "dark") { + setTheme("light"); + localStorage.setItem( + "theme", + JSON.stringify({ + theme: "light", + key: "231273891793871263123", + }) + ); + root.classList.remove("dark"); + root.classList.add("light"); + } + }; return (
@@ -52,7 +53,7 @@ let storageTheme = JSON.parse(localStorage.getItem("theme")) - Kembali + Kembali @@ -81,21 +82,35 @@ let storageTheme = JSON.parse(localStorage.getItem("theme"))
diff --git a/src/index.css b/src/index.css index 4a5a61d..2b7eb07 100644 --- a/src/index.css +++ b/src/index.css @@ -9,8 +9,8 @@ html { display: none; } .no-scrollbars { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ } @font-face { @@ -61,3 +61,7 @@ html { ::-webkit-scrollbar-thumb:hover { background: #0085d7; } + +html { + scroll-padding-top: 80px; /* Sesuaikan dengan tinggi navbar */ +} diff --git a/src/page/detailSurah/DetailSurah.jsx b/src/page/detailSurah/DetailSurah.jsx index 66eb264..403e9e7 100644 --- a/src/page/detailSurah/DetailSurah.jsx +++ b/src/page/detailSurah/DetailSurah.jsx @@ -4,6 +4,7 @@ import { toast } from "react-hot-toast"; import DetailSurahView from "./DetailSurahView"; import ProgresContext from "../../lib/ProgresContext"; import surahtonumber from "../../data/surahtonumber.json"; +import numbertosurah from "../../data/numbertosurah.json"; const DetailSurah = () => { const { id } = useParams(); @@ -85,7 +86,7 @@ const DetailSurah = () => { const saveAyat = (url, ayat, namaSurat) => { toast.success("Simpan Berhasil"); - localStorage.setItem("url", url); + localStorage.setItem("url", numbertosurah[url]); localStorage.setItem("ayat", ayat); localStorage.setItem("namaSurat", namaSurat); }; @@ -145,6 +146,7 @@ const DetailSurah = () => { setFont={setFont} property={propertyStorage} setProperty={setProperty} + numbertosurah={numbertosurah} /> ); diff --git a/src/page/detailSurah/DetailSurahView.jsx b/src/page/detailSurah/DetailSurahView.jsx index ccd16fa..1ced684 100644 --- a/src/page/detailSurah/DetailSurahView.jsx +++ b/src/page/detailSurah/DetailSurahView.jsx @@ -17,8 +17,7 @@ const DetailSurahView = ({ setModalAyat, font, setFont, - property, - setProperty, + numbertosurah, }) => { return ( <> @@ -59,7 +58,7 @@ const DetailSurahView = ({ /> -
+
{/* ++ Control Font */}
@@ -158,7 +157,7 @@ const DetailSurahView = ({
  • @@ -191,7 +190,7 @@ const DetailSurahView = ({ className="modal-toggle" />
    -
    +