diff --git a/src/components/PageLayout/Footer/Footer.tsx b/src/components/PageLayout/Footer/Footer.tsx index e281d182..a166edae 100644 --- a/src/components/PageLayout/Footer/Footer.tsx +++ b/src/components/PageLayout/Footer/Footer.tsx @@ -1,16 +1,35 @@ +import {useQuery} from '@tanstack/react-query' +import axios from 'axios' import {FC} from 'react' +import {Loading} from '@/components/Loading/Loading' +import {ILogo, Logo} from '@/components/PageLayout/Footer/Logo' + import styles from './Footer.module.scss' +import logoStyles from './Logo.module.scss' export const Footer: FC = () => { + const { + data: postsData, + isLoading: logosIsLoading, + error: postsError, + } = useQuery({ + queryKey: ['cms', 'logo'], + queryFn: () => axios.get('/api/cms/logo'), + }) + const logos = postsData?.data ?? [] + return (
-

futo

-

futo

-

futo

-

futo

+
+ {logosIsLoading && } + {logos.map((post) => ( + + ))} + {postsError &&

{postsError.message}

} +