Skip to content
Snippets Groups Projects
Commit ec148b1d authored by Barnabás Czémán's avatar Barnabás Czémán
Browse files

Temporary remove trainers menu

parent 411853f0
No related branches found
No related tags found
No related merge requests found
...@@ -25,11 +25,14 @@ export const getUserData = () => ( ...@@ -25,11 +25,14 @@ export const getUserData = () => (
export const getNews = () => ( export const getNews = () => (
async (dispatch) => { async (dispatch) => {
const news = await axios.get('/api/v1/news'); const response= await axios.get('/api/v1/news');
dispatch({ if(response) {
type: GET_NEWS, dispatch({
payload: news, type: GET_NEWS,
}); payload: response.data,
});
}
} }
); );
......
...@@ -17,8 +17,8 @@ const FixedMenu = ({ user }) => ( ...@@ -17,8 +17,8 @@ const FixedMenu = ({ user }) => (
<Container> <Container>
<Menu.Item as={NavLink} to='/home'>Főoldal</Menu.Item> <Menu.Item as={NavLink} to='/home'>Főoldal</Menu.Item>
<Menu.Item as={NavLink} to='/news'>Hírek</Menu.Item> <Menu.Item as={NavLink} to='/news'>Hírek</Menu.Item>
<Menu.Item as={NavLink} to='/circles'>Köreink</Menu.Item> <Menu.Item as={NavLink} to='/groups'>Köreink</Menu.Item>
<Menu.Item as={NavLink} to='/trainers'>Képzők</Menu.Item> {/* <Menu.Item as={NavLink} to='/trainers'>Képzők</Menu.Item> */}
<Menu.Item as={NavLink} to='/schedule'>Ütemterv</Menu.Item> <Menu.Item as={NavLink} to='/schedule'>Ütemterv</Menu.Item>
<Menu.Menu position='right'> <Menu.Menu position='right'>
...@@ -80,8 +80,8 @@ class Header extends Component { ...@@ -80,8 +80,8 @@ class Header extends Component {
Főoldal Főoldal
</Menu.Item> </Menu.Item>
<Menu.Item as={NavLink} to='/news'>Hírek</Menu.Item> <Menu.Item as={NavLink} to='/news'>Hírek</Menu.Item>
<Menu.Item as={NavLink} to='/circles'>Köreink</Menu.Item> <Menu.Item as={NavLink} to='/groups'>Köreink</Menu.Item>
<Menu.Item as={NavLink} to='/trainers'>Képzők</Menu.Item> {/* <Menu.Item as={NavLink} to='/trainers'>Képzők</Menu.Item> */}
<Menu.Item as={NavLink} to='/schedule'>Ütemterv</Menu.Item> <Menu.Item as={NavLink} to='/schedule'>Ütemterv</Menu.Item>
<Menu.Item position='right'> <Menu.Item position='right'>
......
...@@ -12,7 +12,6 @@ class News extends Component { ...@@ -12,7 +12,6 @@ class News extends Component {
render_news() { render_news() {
const news = this.props.news; const news = this.props.news;
console.log(news);
return news.map( (item, index) => ( return news.map( (item, index) => (
<div key={index}> <div key={index}>
......
...@@ -5,7 +5,7 @@ const INITIAL_STATE = []; ...@@ -5,7 +5,7 @@ const INITIAL_STATE = [];
export default (state = INITIAL_STATE, action) => { export default (state = INITIAL_STATE, action) => {
switch (action.type) { switch (action.type) {
case GET_NEWS: case GET_NEWS:
return [ ...state, ...action.payload.data ]; return [ ...state, ...action.payload ];
default: default:
return state; return state;
} }
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment