Ive created a GoalsIndex function and trying to render the goals. I didnt seed the database however I was able to sucessfully create some goals in Postman. I am also not seing my res console.log.
Post any code you think might be relevant (one fenced block per file)
import GoalsIndex from "./goals/GoalsIndex"
import {Container} from 'react-bootstrap'
const Home = (props) => {
const { msgAlert, user } = props
// console.log('props in home', props)
return (
<Container>
<h2>Home Page</h2>
<GoalsIndex msgAlert={msgAlert}/>
</Container>
)
}
export default Home
api/goals.js
import apiUrl from '../apiConfig'
import axios from 'axios'
//index
export const getAllGoals = () => {
return axios(`${apiUrl}/goals`)
}
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
I am seeing a messages.indexGoalsFailure
What is your best guess as to the source of the problem?
My best guess is it has to do with seeding the database. However, my thought was that you didnt have to seed if you can successfully create in Postman.
What things have you already tried to solve the problem?
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
What's the problem you're trying to solve?
Ive created a GoalsIndex function and trying to render the goals. I didnt seed the database however I was able to sucessfully create some goals in Postman. I am also not seing my res console.log.
Post any code you think might be relevant (one fenced block per file)
Goals.Index
Home.js
api/goals.js
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
I am seeing a messages.indexGoalsFailure
What is your best guess as to the source of the problem?
My best guess is it has to do with seeding the database. However, my thought was that you didnt have to seed if you can successfully create in Postman.
What things have you already tried to solve the problem?
Paste a link to your repository here
https://github.com/jpineda48/myGoalsApp