Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
import { share } from '../../../state/sharing/actions'
import { openHistory } from '../../../state/general/actions'
import { getSettings } from '../../../state/workspace/reducers'
import { Session } from '../../../state/sessions/reducers'
import { ISettings } from '../../../types'

export interface Props {
Expand All @@ -30,6 +31,7 @@ export interface Props {
fixedEndpoint?: boolean
isPollingSchema: boolean
endpointUnreachable: boolean
session: Session

editEndpoint: (value: string) => void
prettifyQuery: () => void
Expand Down Expand Up @@ -111,8 +113,7 @@ class TopBar extends React.Component<Props, {}> {
this.props.openHistory()
}
getCurl = () => {
// no need to rerender the whole time. only on-demand the store is fetched
const session = getSelectedSession(this.context.store.getState())
const session = this.props.session
let variables
try {
variables = JSON.parse(session.variables)
Expand Down Expand Up @@ -157,6 +158,7 @@ const mapStateToProps = createStructuredSelector({
isPollingSchema: getIsPollingSchema,
endpointUnreachable: getEndpointUnreachable,
settings: getSettings,
session: getSelectedSession,
})

export default connect(
Expand Down