mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 13:15:05 +00:00
backend and frontend connect in progress
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { Component } from "react";
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import Route from 'react-router-dom/Route';
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
class Writing_Microblogs extends Component {
|
||||
@@ -25,7 +26,13 @@ class Writing_Microblogs extends Component {
|
||||
}
|
||||
|
||||
handleSubmit(event) {
|
||||
alert('A title for the microblog was inputted: ' + this.state.title + '\nA microblog was posted: ' + this.state.value);
|
||||
// alert('A title for the microblog was inputted: ' + this.state.title + '\nA microblog was posted: ' + this.state.value);
|
||||
const response = await axios.post(
|
||||
'http://localhost:5001/twistter-e4649/us-central1/api/putPost',
|
||||
{ },
|
||||
{ headers: { 'Content-Type': 'application/json'} }
|
||||
)
|
||||
console.log(response.data);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user