Skip to content

Commit

Permalink
Merge pull request #9 from jendhordejan/dbtoheroku
Browse files Browse the repository at this point in the history
changed db connection to heroku
  • Loading branch information
jendhordejan committed Apr 29, 2020
2 parents 33c8a40 + edc8ef8 commit 0dc02e2
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 81 deletions.
19 changes: 0 additions & 19 deletions src/Dish/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,6 @@ export function dishGetAll() {
};
}

// export function menuGetByUserId(userId) {
// const id = userId;
// return async (dispatch, getState) => {
// try {
// const responseData = await instance.get(`/menus/${id}`);

// console.log("menuGetByUserId responseData: ", responseData.data.menus);

// responseData.data.menus.map(menuData => {
// console.log("DISPATCH MENUDATA: ", menuData);
// dispatch(menuAllByUser(menuData));
// });
// // dispatch(menuAllByUser(responseData.data.menus));
// } catch (error) {
// throw error;
// }
// };
// }

function dishGetAllSuccess(respData) {
console.log("dishGetAllSuccess respData======>: ", respData);
return {
Expand Down
2 changes: 1 addition & 1 deletion src/axios.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";

const instance = axios.create({
baseURL: "http://localhost:5000"
baseURL: "https://book-a-cook-server.herokuapp.com/"
});
export default instance;
120 changes: 59 additions & 61 deletions src/components/Album.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
import React from 'react';
// import AppBar from '@material-ui/core/AppBar';
import Button from '@material-ui/core/Button';
// import CameraIcon from '@material-ui/icons/PhotoCamera';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import CardMedia from '@material-ui/core/CardMedia';
import CssBaseline from '@material-ui/core/CssBaseline';
import Grid from '@material-ui/core/Grid';
// import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
import Container from '@material-ui/core/Container';
import Link from '@material-ui/core/Link';
import React from "react";

import Button from "@material-ui/core/Button";

import Card from "@material-ui/core/Card";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import CardMedia from "@material-ui/core/CardMedia";
import CssBaseline from "@material-ui/core/CssBaseline";
import Grid from "@material-ui/core/Grid";

import Typography from "@material-ui/core/Typography";
import { makeStyles } from "@material-ui/core/styles";
import Container from "@material-ui/core/Container";
import Link from "@material-ui/core/Link";
import TextField from "@material-ui/core/TextField";

function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
{"Copyright © "}
<Link color="inherit" href="https://material-ui.com/">
Your Website
</Link>{' '}
</Link>{" "}
{new Date().getFullYear()}
{'.'}
{"."}
</Typography>
);
}

const useStyles = makeStyles(theme => ({
icon: {
marginRight: theme.spacing(2),
marginRight: theme.spacing(2)
},
heroContent: {
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(8, 0, 6),
padding: theme.spacing(8, 0, 6)
},
heroButtons: {
marginTop: theme.spacing(4),
marginTop: theme.spacing(4)
},
cardGrid: {
paddingTop: theme.spacing(8),
paddingBottom: theme.spacing(8),
paddingBottom: theme.spacing(8)
},
card: {
height: '100%',
display: 'flex',
flexDirection: 'column',
height: "100%",
display: "flex",
flexDirection: "column"
},
cardMedia: {
paddingTop: '56.25%', // 16:9
paddingTop: "56.25%"
},
cardContent: {
flexGrow: 1,
flexGrow: 1
},
footer: {
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(6),
},
padding: theme.spacing(6)
}
}));

const cards = [1, 2, 3, 4, 5, 6, 7, 8, 9];
Expand All @@ -69,42 +69,34 @@ export default function Album() {
<React.Fragment>
<CssBaseline />
<main>
{/* Hero unit */}
<div className={classes.heroContent}>
<Container maxWidth="sm">
<Typography component="h1" variant="h4" align="center" color="textPrimary" gutterBottom>
<Typography
component="h1"
variant="h4"
align="center"
color="textPrimary"
gutterBottom
>
Find the best cooks in your area
</Typography>
{/* Search Input */}
<TextField
name="searchText"
floatingLabelText="Search For Images"
// value={this.state.searchText} //directly connecting the value from our state
// onChange={this.handleOnChange} //calls a function to handle changes in the TextField
fullWidth={true}
/>
<Typography variant="h6" align="center" color="textSecondary" paragraph>
Let a cook prepare the food while you take care of something more important...
spending time with your family and friends.
name="searchText"
floatingLabelText="Search For Images"
fullWidth={true}
/>
<Typography
variant="h6"
align="center"
color="textSecondary"
paragraph
>
Let a cook prepare the food while you take care of something more
important... spending time with your family and friends.
</Typography>
{/* <div className={classes.heroButtons}>
<Grid container spacing={2} justify="center">
<Grid item>
<Button variant="contained" color="primary">
Main call to action
</Button>
</Grid>
<Grid item>
<Button variant="outlined" color="primary">
Secondary action
</Button>
</Grid>
</Grid>
</div> */}
</Container>
</div>
<Container className={classes.cardGrid} maxWidth="md">
{/* End hero unit */}
<Grid container spacing={4}>
{cards.map(card => (
<Grid item key={card} xs={12} sm={6} md={4}>
Expand All @@ -119,7 +111,8 @@ export default function Album() {
Heading
</Typography>
<Typography>
This is a media card. You can use this section to describe the content.
This is a media card. You can use this section to describe
the content.
</Typography>
</CardContent>
<CardActions>
Expand All @@ -136,17 +129,22 @@ export default function Album() {
</Grid>
</Container>
</main>
{/* Footer */}
<footer className={classes.footer}>
{/* Footer */}
<footer className={classes.footer}>
<Typography variant="h6" align="center" gutterBottom>
Footer
</Typography>
<Typography variant="subtitle1" align="center" color="textSecondary" component="p">
<Typography
variant="subtitle1"
align="center"
color="textSecondary"
component="p"
>
Something here to give the footer a purpose!
</Typography>
<Copyright />
</footer>
{/* End footer */}
</React.Fragment>
);
}
}

0 comments on commit 0dc02e2

Please sign in to comment.