Skip to content

Commit

Permalink
Merge pull request #16 from parquar:site-work
Browse files Browse the repository at this point in the history
move to axios
  • Loading branch information
parkerholcomb authored Apr 4, 2021
2 parents dfc436e + 263f7f0 commit fb07158
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 50 deletions.
13 changes: 13 additions & 0 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"license": "MIT",
"dependencies": {
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"react": "^17.0.2",
"react-bootstrap": "^1.5.2",
Expand Down
8 changes: 4 additions & 4 deletions site/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { Component } from 'react';
import Form from 'react-bootstrap/Form';
import Navbar from 'react-bootstrap/Navbar';
import Nav from 'react-bootstrap/Nav';
import { sendPrompt } from './utils/api';

import axios from 'axios'

export default class App extends Component {
constructor(props) {
Expand Down Expand Up @@ -37,8 +36,9 @@ export default class App extends Component {

console.log(this.state)

resp = await sendPrompt(this.state['phone'])
console.log(resp)
const results = await axios.post('https://p6ccqa7dik.execute-api.us-east-1.amazonaws.com/dev/sms/prompt', {
phone: this.state['phone'],
});

const phone = this.state['phone']
const nextState = {
Expand Down
46 changes: 0 additions & 46 deletions site/src/utils/api.js

This file was deleted.

0 comments on commit fb07158

Please sign in to comment.