MVP
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user