This commit is contained in:
E
2021-03-07 21:46:40 -07:00
parent b0aec2cfd1
commit 0760c93ce4
7 changed files with 107 additions and 48 deletions
+6 -7
View File
@@ -4,7 +4,6 @@ import React, { FormEvent } from 'react'
import { useState } from 'react'
import { useHistory } from 'react-router-dom'
import { createClient } from '../api'
import settings from '../settings'
export const Dashboard = () => {
const history = useHistory()
@@ -30,13 +29,13 @@ export const Dashboard = () => {
return
}
if (settings.env === 'jank') {
history.push(`/sessions/${phone}`)
return
}
const client_id = await createClient({
name,
email,
phone: parseInt(phone),
})
await createClient({ name, email, phone: parseInt(phone) })
history.push(`/sessions/${phone}`)
history.push(`/sessions/${client_id}`)
}
return (