diff --git a/src/pages/details-page.tsx b/src/pages/details-page.tsx index 73546d8..7b6a823 100644 --- a/src/pages/details-page.tsx +++ b/src/pages/details-page.tsx @@ -17,6 +17,7 @@ export default function DetailsPage() { const { postId } = useParams(); const navigate = useNavigate(); + useEffect(() => { const getPostById = async () => { try { @@ -34,6 +35,14 @@ export default function DetailsPage() { } }, [post]); + useEffect(() => { + const storedTheme = localStorage.getItem('theme') ?? 'light'; + const textContainer = document.getElementById('textcontainer'); + if (textContainer) { + textContainer.setAttribute('data-color-mode', storedTheme); + } + }, []) + if (!loading) return (
@@ -58,10 +67,10 @@ export default function DetailsPage() {

-
-
- -
+
+
+ +
);