From ca9923c0811b7eee621d75a44434268f4f40f010 Mon Sep 17 00:00:00 2001 From: Dylan Regan <4dylanregan@gmail.com> Date: Thu, 11 Nov 2021 20:02:41 -0500 Subject: [PATCH] that is 1 hour im never getting back --- package-lock.json | 13 +++++++++++++ package.json | 3 +++ src/App.js | 13 +++++++++---- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea6676c..692e7d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3181,6 +3181,14 @@ "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.4.tgz", "integrity": "sha512-4Hk6iSA/H90rtiPoCpSkeJxNWCPBf7szwVvaUqrPdxo0j2Y04suHK9jPKXaE3WI7OET6wBSwsWw7FDc1DBq7iQ==" }, + "axios": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", + "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", + "requires": { + "follow-redirects": "^1.14.4" + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -8174,6 +8182,11 @@ "istanbul-lib-report": "^3.0.0" } }, + "jQuery": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/jQuery/-/jQuery-1.7.4.tgz", + "integrity": "sha1-8y3FyFpwRO6GS0RDue5F+UeLoTc=" + }, "jest": { "version": "26.6.0", "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.0.tgz", diff --git a/package.json b/package.json index 44448ea..f6d542d 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^11.2.7", "@testing-library/user-event": "^12.8.3", + "axios": "^0.24.0", + "express": "^4.17.1", + "jQuery": "^1.7.4", "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "4.0.3", diff --git a/src/App.js b/src/App.js index 12cd78a..c8f09e2 100644 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; - +const axios = require('axios'); class App extends Component { constructor(props) { super(props); @@ -7,9 +7,13 @@ class App extends Component { message: "Default Content" } } - + + asyncCall = async () => { + return axios.get('https://raw.githubusercontent.com/Senior-Design-2021-Ebook-Team/markdown-parser/main/fpb.json'); + } + updateContent = () => { - if (this.state.message == "Default Content") { + if (this.state.message === "Default Content") { this.setState({ message: "Updated Content!"}); } else { @@ -18,6 +22,7 @@ class App extends Component { } render() { + console.log(this.asyncCall()); return (
@@ -25,7 +30,7 @@ class App extends Component {