diff --git a/pages/services.tsx b/pages/services.tsx index 9a24a5a..25436b5 100644 --- a/pages/services.tsx +++ b/pages/services.tsx @@ -4,31 +4,54 @@ import Dockerode from 'dockerode'; import { ReactElement } from 'react' import useSWR from 'swr'; import { CardContentService, PageContentBox, PageDescription, PageTitle } from '../components/styles/content'; +import { ServiceCardMobile } from '../components/styles/cards/mobile'; import ServiceList from '../public/pages.json'; +import useWindowSize from '../components/windowsize'; const fetcher = (url: string) => fetch(url).then((res) => res.json()) function Services() { const { initialData, fullData, loadingFull, error } = useServices(); + const isMobile = useWindowSize(); let content: ReactElement = <>; if (error) { content =
Error loading data
} else if (loadingFull) { - content = - - {initialData?.map((item: Service) => ( - - ))} - + if (isMobile) { + content = + + {initialData?.map((item: Service) => ( + + ))} + + } + else { + content = + + {initialData?.map((item: Service) => ( + + ))} + + } } else if (fullData) { - content = - - {fullData.map((item: Service) => ( - - ))} - + if (isMobile) { + content = + + {fullData.map((item: Service) => ( + + ))} + + } + else { + content = + + {fullData.map((item: Service) => ( + + ))} + + } } else { content =
Error loading data