mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
enable error messages through redux in instructor-logs page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { withRouter } from 'react-router-dom'
|
||||
|
||||
import { connect } from 'react-redux'
|
||||
import { TimeLogsSelectForm } from './TimeLogsSelectForm'
|
||||
import { TimeLogRow } from './TimeLogRow'
|
||||
import LoadingSpinner from '../common/LoadingSpinner'
|
||||
@@ -11,7 +11,7 @@ import groupManagementService from '../../services/groupManagement'
|
||||
import instructorTimeLogsService from '../../services/instructorTimeLogs'
|
||||
import * as notificationActions from '../../reducers/actions/notificationActions'
|
||||
|
||||
const InstructorTimeLogsPage = () => {
|
||||
const InstructorTimeLogsPage = (props) => {
|
||||
const [allConfigurations, setAllConfigurations] = useState([])
|
||||
const [selectedConfiguration, setSelectedConfiguration] = useState(null)
|
||||
const [allGroups, setAllGroups] = useState([])
|
||||
@@ -131,6 +131,15 @@ const InstructorTimeLogsPage = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
state: state,
|
||||
})
|
||||
|
||||
const mapDispatchToProps = {
|
||||
setError: notificationActions.setError,
|
||||
setSuccess: notificationActions.setSuccess,
|
||||
}
|
||||
|
||||
export default withRouter(
|
||||
(InstructorTimeLogsPage)
|
||||
connect(mapStateToProps, mapDispatchToProps)(InstructorTimeLogsPage)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user