Skip to content

Commit

Permalink
#10 Install axios and add api
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jun 20, 2023
1 parent ac9261f commit cac3b68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styles from './App.module.css'
import NavBar from './components/NavBar';
import Container from 'react-bootstrap/Container';
import { Route, Switch } from 'react-router-dom';
import './api/axiosDefaults'


function App() {
Expand Down
14 changes: 0 additions & 14 deletions src/App.module.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/* Add general styles like hover effects and such */

:root {
/* Colors */
--clr-primary-light: rgb(245, 245, 245);
--clr-primary-dark: rgb(35 32 14);

--clr-natural-light: rgb(255, 250, 243);

--clr-accent-pink: rgb(160 108 131);
--clr-accent-light: rgb(149, 164, 170);
--clr-accent-dark: rgb(72 102 113);
}

.App {
background-color: var(--clr-primary-light);
color: var(--clr-primary-dark);
Expand Down
5 changes: 5 additions & 0 deletions src/api/axiosDefaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import axios from "axios";

axios.defaults.baseURL = 'https://travel-tickr-api-e57198555b47.herokuapp.com/' //url to api
axios.defaults.headers.post['Content-Type'] = 'multipart/form-data' // multipart necessary since we have both text and images
axios.defaults.withCredentials = true

0 comments on commit cac3b68

Please sign in to comment.