diff --git a/client/src/api/index.ts b/client/src/api/index.ts index ffddb33..fb4c1bd 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -5,7 +5,7 @@ import settings from '../settings' const apiUrl = '/api' -export const createClient = async (body: Client) => { +export const createClient = async (body: Omit) => { await axios.post(`${apiUrl}/clients`, body) } @@ -20,12 +20,12 @@ export const getClient = async (id: string): Promise => { return res.data } export const startSession = async (clientId: string) => { - const res = await axios.post(`${apiUrl}/clients/${clientId}/session`) + const res = await axios.post(`${apiUrl}/clients/${clientId}`) return res.data // session data } export const killSession = async (clientId: string) => { - await axios.delete(`${apiUrl}/clients/${clientId}/session`) + await axios.delete(`${apiUrl}/clients/${clientId}`) } export const restartSession = async (clientId: string) => { diff --git a/client/src/index.tsx b/client/src/index.tsx index f66fdb4..248801e 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -5,12 +5,7 @@ import 'antd/dist/antd.css' import App from './App' import reportWebVitals from './reportWebVitals' -ReactDOM.render( - - - , - document.getElementById('root'), -) +ReactDOM.render(, document.getElementById('root')) // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index 439889c..adceed6 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -1,3 +1,4 @@ +import { message } from 'antd' import { Content } from 'antd/lib/layout/layout' import React, { FormEvent } from 'react' import { useState } from 'react' @@ -24,6 +25,7 @@ export const Dashboard = () => { if (phone.length < 10) { // helpful message + message.error('Check all fields!') setError('Phone number needs to be a length of at least 10') return } @@ -44,6 +46,7 @@ export const Dashboard = () => {