diff --git a/src/components/screens/services/Services.tsx b/src/components/screens/services/Services.tsx
index 6c5891c..57a4e78 100644
--- a/src/components/screens/services/Services.tsx
+++ b/src/components/screens/services/Services.tsx
@@ -59,7 +59,7 @@ export default function Services({}: Props) {
const getServices = async () => {
try {
- const response = await ProductService.get()
+ const response = await ProductService.get('')
setServices(response.data.Data)
} catch (error) {
setErrorState(true)
@@ -85,6 +85,10 @@ export default function Services({}: Props) {
Ошибка, не удалось получить услуги, сервер не доступен.
+ ) : services.length === 0 ? (
+
+ Услуг пока нет
+
) : (
{services.map((item, index) => (
diff --git a/src/services/order/ordersServices.ts b/src/services/order/ordersServices.ts
index 0c5a0b7..2c3f93b 100644
--- a/src/services/order/ordersServices.ts
+++ b/src/services/order/ordersServices.ts
@@ -1,6 +1,6 @@
-import { hostName } from '@/constants/host'
import axios, { AxiosResponse } from 'axios'
import { T_NewOrder } from './type'
+import { hostName } from '../../../config'
export default class OrdersService {
static async get(): Promise {
diff --git a/src/services/product/productServeces.ts b/src/services/product/productServeces.ts
index 5197f59..8796657 100644
--- a/src/services/product/productServeces.ts
+++ b/src/services/product/productServeces.ts
@@ -1,6 +1,6 @@
-import { hostName } from '@/constants/host'
import axios, { AxiosResponse } from 'axios'
import { T_NewProduct, T_Product } from './type'
+import { hostName } from '../../../config'
export default class ProductService {
static async get(searchQuery: string): Promise {
diff --git a/src/services/user/userServices.ts b/src/services/user/userServices.ts
new file mode 100644
index 0000000..99cdbb6
--- /dev/null
+++ b/src/services/user/userServices.ts
@@ -0,0 +1,28 @@
+import axios, { AxiosResponse } from 'axios'
+import { hostName } from '../../../config'
+
+type T_user = {
+ login: string
+ password: string
+}
+
+export default class UserService {
+ static async auth(user: T_user): Promise {
+ try {
+ const response = await axios.get(
+ `${hostName}/auth?a123=${user.login}&a321=${user.password}`
+ )
+ return response
+ } catch (error: any) {
+ return error.response
+ }
+ }
+ static async exit(): Promise {
+ try {
+ const response = await axios.get(`${hostName}/exit`)
+ return response
+ } catch (error: any) {
+ return error.response
+ }
+ }
+}