Skip to content

Commit 78290f2

Browse files
remo5000ning-y
authored andcommitted
Fix tabs not working (#175)
* Fix tabbing for AssessmentWorkspace * Fix tabbing for GradingWorkspace
1 parent 80482b4 commit 78290f2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/academy/grading/GradingWorkspace.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class GradingWorkspace extends React.Component<GradingWorkspaceProps> {
103103
private sideContentProps: (p: GradingWorkspaceProps) => SideContentProps = (
104104
props: GradingWorkspaceProps
105105
) => ({
106-
activeTab: 0,
107-
handleChangeActiveTab: (aT: number) => {},
106+
activeTab: props.activeTab,
107+
handleChangeActiveTab: props.handleChangeActiveTab,
108108
tabs: [
109109
{
110110
label: `Grading: Question ${props.questionId}`,

src/components/assessment/AssessmentWorkspace.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ class AssessmentWorkspace extends React.Component<
123123
private sideContentProps: (p: AssessmentWorkspaceProps) => SideContentProps = (
124124
props: AssessmentWorkspaceProps
125125
) => ({
126-
activeTab: 0,
127-
handleChangeActiveTab: (aT: number) => {},
126+
activeTab: props.activeTab,
127+
handleChangeActiveTab: props.handleChangeActiveTab,
128128
tabs: [
129129
{
130130
label: `Task ${props.questionId}`,

src/reducers/workspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const reducer: Reducer<IWorkspaceManagerState> = (
5353
...state,
5454
[location]: {
5555
...state[location],
56-
sideContentActiveTab: action.payload
56+
sideContentActiveTab: action.payload.activeTab
5757
}
5858
}
5959
case CHANGE_EDITOR_WIDTH:

0 commit comments

Comments
 (0)