summaryrefslogtreecommitdiff
path: root/src/core/components/elements/Navbar/TopBanner.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/components/elements/Navbar/TopBanner.jsx')
-rw-r--r--src/core/components/elements/Navbar/TopBanner.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/components/elements/Navbar/TopBanner.jsx b/src/core/components/elements/Navbar/TopBanner.jsx
index 9efd0a8d..dca2e930 100644
--- a/src/core/components/elements/Navbar/TopBanner.jsx
+++ b/src/core/components/elements/Navbar/TopBanner.jsx
@@ -2,11 +2,16 @@ import odooApi from '@/core/api/odooApi'
import { useQuery } from 'react-query'
import Image from 'next/image'
import Link from '../Link/Link'
+import { TopBannerSkeleton } from '../Skeleton/TopBannerSkeleton'
const TopBanner = () => {
const fetchTopBanner = async () => await odooApi('GET', '/api/v1/banner?type=top-banner')
const topBanner = useQuery('topBanner', fetchTopBanner)
+ if (topBanner.isLoading) {
+ return <TopBannerSkeleton />
+ }
+
return (
topBanner.isFetched &&
topBanner.data?.length > 0 && (