Skip to content

Commit

Permalink
Merge pull request #229 from Ohtuilmo/fix/topic-pages-crash
Browse files Browse the repository at this point in the history
Fix issue causing topic pages to crash
  • Loading branch information
miahro authored Mar 26, 2024
2 parents fd3b5a0 + 2b4cdf7 commit d4a613f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/TimeLogsPage/TimeLogsPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

.input-container {
display: flex;
align-items: flex-end;
flex-wrap: wrap;
gap: 14px;
}
Expand Down
15 changes: 6 additions & 9 deletions frontend/src/components/ViewTopicPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import Topic from './Topic'
import TopicEditPage from './TopicEditPage'
import viewTopicPageActions from '../reducers/actions/viewTopicPageActions'
Expand Down Expand Up @@ -28,8 +29,7 @@ class ViewTopicPage extends React.Component {
copyToConfiguration = async () => {
// eslint-disable-next-line
const ok = confirm('sure?')
console.log(this.props.topic.id )
if ( ok ) {
if (ok) {
try {
// eslint-disable-next-line
const createdTopic = await topicService.copy(this.props.topic.id)
Expand Down Expand Up @@ -72,7 +72,7 @@ const mapStateToProps = (state) => {
topic: state.viewTopicPage.topic,
isEditable: state.viewTopicPage.isEditable,
isOnEditMode: state.viewTopicPage.isOnEditMode,
user: state.login.user
user: state.login.user,
}
}

Expand All @@ -81,9 +81,6 @@ const mapDispatchToProps = {
setSuccess: notificationActions.setSuccess,
}

const ConnectedViewTopicPage = connect(
mapStateToProps,
mapDispatchToProps
)(ViewTopicPage)

export default ConnectedViewTopicPage
export default withRouter(
connect(mapStateToProps, mapDispatchToProps)(ViewTopicPage)
)

0 comments on commit d4a613f

Please sign in to comment.