diff --git a/src/components/service/NoService/index.tsx b/src/components/service/NoService/index.tsx new file mode 100644 index 0000000..da1d791 --- /dev/null +++ b/src/components/service/NoService/index.tsx @@ -0,0 +1,16 @@ +import React, { FC } from 'react'; + +import emptyImg from '@/assets/images/empty.png'; + +import { emptyStyle } from './style'; + +const NoService: FC = () => { + return ( +
+ empty +

There are no services

+
+ ); +}; + +export default NoService; diff --git a/src/components/service/NoService/style.ts b/src/components/service/NoService/style.ts new file mode 100644 index 0000000..f35bc36 --- /dev/null +++ b/src/components/service/NoService/style.ts @@ -0,0 +1,16 @@ +import { SerializedStyles, Theme, css } from '@emotion/react'; + +export const emptyStyle = (theme: Theme): SerializedStyles => css` + text-align: center; + + img { + width: 320px; + } + + p { + font-family: ${theme.fontCoding}; + font-size: 20px; + color: ${theme.colorPrimary}; + margin-top: 5px; + } +`; diff --git a/src/components/service/ServiceList/index.tsx b/src/components/service/ServiceList/index.tsx index d0306b1..5de8cc1 100644 --- a/src/components/service/ServiceList/index.tsx +++ b/src/components/service/ServiceList/index.tsx @@ -1,9 +1,8 @@ import React, { FC } from 'react'; -import emptyImg from '@/assets/images/empty.png'; - +import NoService from '../NoService'; import ServiceItem from '../ServiceItem'; -import { emptyStyle, headerStyle, listStyle, wrapperStyle } from './style'; +import { headerStyle, listStyle, wrapperStyle } from './style'; type ServiceListProps = { serviceCount: number; @@ -44,10 +43,7 @@ const ServiceList: FC = ({ ) : ( -
- empty -

There are no services

-
+ )} ); diff --git a/src/components/service/ServiceList/style.ts b/src/components/service/ServiceList/style.ts index 563caeb..4cf54c1 100644 --- a/src/components/service/ServiceList/style.ts +++ b/src/components/service/ServiceList/style.ts @@ -20,18 +20,3 @@ export const listStyle = css` flex-direction: column; align-items: center; `; - -export const emptyStyle = (theme: Theme): SerializedStyles => css` - text-align: center; - - img { - width: 320px; - } - - p { - font-family: ${theme.fontCoding}; - font-size: 20px; - color: ${theme.colorPrimary}; - margin-top: 5px; - } -`;