feat: Refactor home page components

This commit is contained in:
Wini_Fy
2026-02-05 21:20:12 +07:00
parent 2a475901cc
commit 03263d5fb1
6 changed files with 149 additions and 64 deletions

View File

@@ -22,7 +22,13 @@ const FooterBottom = () => {
loadFooterData();
}, []);
const { bottom } = data;
// Ensure we always have a valid `bottom` object, even if API shape changes
const bottom = data?.bottom || footerData.bottom;
// If bottom is still missing, avoid rendering to prevent runtime errors
if (!bottom) {
return null;
}
return (
<div className="footer-bottom">