- PR Change Requests (Progress)
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -2,8 +2,15 @@ import React from "react";
|
||||
import TaskListContainer from "../../components/task-list/task-list.container.jsx";
|
||||
import { QUERY_ALL_TASKS_PAGINATED, QUERY_MY_TASKS_PAGINATED } from "../../graphql/tasks.queries.js";
|
||||
import taskPageTypes from "./taskPageTypes.jsx";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors.js";
|
||||
|
||||
export default function TasksPageComponent({ bodyshop, currentUser, type }) {
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
|
||||
export default function TasksPageComponent({ currentUser, type }) {
|
||||
switch (type) {
|
||||
case taskPageTypes.MY_TASKS:
|
||||
return (
|
||||
@@ -12,20 +19,11 @@ export default function TasksPageComponent({ bodyshop, currentUser, type }) {
|
||||
relationshipId={currentUser.email}
|
||||
relationshipType={"user"}
|
||||
query={{ QUERY_MY_TASKS_PAGINATED }}
|
||||
bodyshop={bodyshop}
|
||||
titleTranslation={"tasks.titles.my_tasks"}
|
||||
currentUser={currentUser}
|
||||
/>
|
||||
);
|
||||
case taskPageTypes.ALL_TASKS:
|
||||
return (
|
||||
<TaskListContainer
|
||||
query={{ QUERY_ALL_TASKS_PAGINATED }}
|
||||
bodyshop={bodyshop}
|
||||
titleTranslation={"tasks.titles.all_tasks"}
|
||||
currentUser={currentUser}
|
||||
/>
|
||||
);
|
||||
return <TaskListContainer query={{ QUERY_ALL_TASKS_PAGINATED }} titleTranslation={"tasks.titles.all_tasks"} />;
|
||||
default:
|
||||
return <></>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user