Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vantango committed Feb 25, 2021
1 parent 39c0be7 commit 17d01c2
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#93e6fc",
"activityBar.activeBorder": "#fa45d4",
"activityBar.background": "#93e6fc",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#fa45d4",
"activityBarBadge.foreground": "#15202b",
"statusBar.background": "#61dafb",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#2fcefa",
"titleBar.activeBackground": "#61dafb",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#61dafb99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#61dafb"
}
8 changes: 8 additions & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/user-event": "^12.7.1",
"axios": "^0.21.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
Expand Down
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import "./App.css";
import World from "./features/world";
import API from "./utils/API"

// import "./styles.css";

const apiCall = () => {
API.allAlgo().then(data => {
console.log(data);
})
}

function App() {
return (
<div>
<World />



</div>
);
}
Expand Down
28 changes: 28 additions & 0 deletions src/utils/API.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Dependencies
const axios = require("axios")

// Deployed API URL
const URL_PREFIX = "https://vast-oasis-70689.herokuapp.com/"

// Algo API calls
const API = {

// Algorithms
allAlgo: () => {
return axios.post(`${URL_PREFIX}/api/algo`)
},
randomAlgo: () => {
return axios.post(`${URL_PREFIX}/api/random`)
},
easyAlgo: () => {
return axios.post(`${URL_PREFIX}/api/easy`)
},
medAlgo: () => {
return axios.post(`${URL_PREFIX}/api/medium`)
},
hardAlgo: () => {
return axios.post(`${URL_PREFIX}/api/hard`)
},
}

export default API;

0 comments on commit 17d01c2

Please sign in to comment.