Skip to content

Commit

Permalink
Final bits of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed May 9, 2024
1 parent e54e0c7 commit c5eb659
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export const Controlled: Story = {
<Section title="JSON Mode Editor">
{items.jsonModeEditor}
</Section>

<Section title="Question Extras">
{items.questionExtras}
</Section>
</View>

<Section title="Item Editor">
Expand All @@ -102,10 +106,6 @@ export const Controlled: Story = {
<Section title="Hints Editor">
{items.hintsEditor}
</Section>

<Section title="Question Extras">
{items.questionExtras}
</Section>
</View>
)}
</EditorWithLayout>
Expand Down
2 changes: 0 additions & 2 deletions packages/perseus-editor/src/editor-with-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import _ from "underscore";
import DeviceFramer from "./components/device-framer";
import JsonEditor from "./components/json-editor";
import ViewportResizer from "./components/viewport-resizer";
import ContentPreview from "./content-preview";
import CombinedHintsEditor from "./hint-editor";
import IframeContentRenderer from "./iframe-content-renderer";
import ItemEditor from "./item-editor";
Expand Down Expand Up @@ -393,7 +392,6 @@ class EditorWithLayout extends React.Component<Props, State> {
ref={this.itemExtrasEditor}
onChange={(answerArea) =>
this.handleChange({
// @ts-expect-error - TS2322 - Types of property 'calculator' are incompatible.
answerArea: {
...this.props.answerArea,
...answerArea,
Expand Down
7 changes: 4 additions & 3 deletions packages/perseus-editor/src/hint-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
return (
<CombinedHintEditor
ref={"hintEditor" + i}
key={"hintEditor" + i}
isFirst={i === 0}
isLast={i + 1 === hints.length}
key={"hintEditor" + i}
isFirst={i === 0}
isLast={i + 1 === hints.length}
itemId={itemId}
hint={hint}
pos={i}
Expand All @@ -430,6 +430,7 @@ class CombinedHintsEditor extends React.Component<CombinedHintsEditorProps> {
deviceType={this.props.deviceType}
apiOptions={this.props.apiOptions}
highlightLint={this.props.highlightLint}
previewURL={this.props.previewURL}
// TODO(CP-4838): what should be passed here?
contentPaths={[]}
/>
Expand Down

0 comments on commit c5eb659

Please sign in to comment.