Skip to content

Commit

Permalink
npm run fmt-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Nov 14, 2023
1 parent c0ece04 commit 8f0356b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 34 deletions.
4 changes: 2 additions & 2 deletions src/components/DataEntry/DataEntryTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ export default function DataEntryTable(
selectedDup: id
? prev.suggestedDups.find((w) => w.id === id)
: id === ""
? newWord(prev.newVern)
: undefined,
? newWord(prev.newVern)
: undefined,
}));
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/ProjectExport/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export default function DownloadButton(
return exportState.status === ExportStatus.Failure
? themeColors.error
: props.colorSecondary
? themeColors.secondary
: themeColors.primary;
? themeColors.secondary
: themeColors.primary;
}

function iconFunction(): () => void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ export default function DragSense(props: DragSenseProps): ReactElement {
background: isInSidebar
? "lightblue"
: props.isProtectedSense
? "lightyellow"
: snapshot.draggingOver === trashId
? "red"
: snapshot.isDragging || snapshot.combineTargetFor
? "lightgreen"
: "white",
? "lightyellow"
: snapshot.draggingOver === trashId
? "red"
: snapshot.isDragging || snapshot.combineTargetFor
? "lightgreen"
: "white",
}}
>
<SenseCardContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export default function SidebarDragSense(
snapshot.draggingOver === trashId
? "red"
: snapshot.isDragging
? "lightgreen"
: props.sense.protected
? "lightyellow"
: props.index === 0
? "white"
: "lightgrey",
? "lightgreen"
: props.sense.protected
? "lightyellow"
: props.index === 0
? "white"
: "lightgrey",
}}
>
<SenseCardContent senses={[props.sense]} sidebar />
Expand Down
5 changes: 2 additions & 3 deletions src/goals/MergeDuplicates/Redux/MergeDupsReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,8 @@ function combineIntoFirstSense(senses: MergeTreeSense[]): void {
} else {
const oldText = mainSense.definitions[defIndex].text;
if (!oldText.split(sep).includes(def.text)) {
mainSense.definitions[
defIndex
].text = `${oldText}${sep}${def.text}`;
mainSense.definitions[defIndex].text =
`${oldText}${sep}${def.text}`;
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ global.console.error = (message) => {
global.console.warn = (message) => {
throw message;
};

// https://github.com/testing-library/react-testing-library/issues/1061#issuecomment-1117450890
global.IS_REACT_ACT_ENVIRONMENT = true;
16 changes: 8 additions & 8 deletions src/utilities/fontContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ export class ProjectFonts {
direction: props.vernacular
? this.vernacularDir
: props.lang
? this.getLangDir(props.lang)
: props.analysis
? this.analysisDir
: style?.direction,
? this.getLangDir(props.lang)
: props.analysis
? this.analysisDir
: style?.direction,
fontFamily: props.vernacular
? this.vernacularFont
: props.lang
? this.getLangFont(props.lang)
: props.analysis
? this.analysisFont
: style?.fontFamily ?? this.inherit,
? this.getLangFont(props.lang)
: props.analysis
? this.analysisFont
: style?.fontFamily ?? this.inherit,
};
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/utilities/wordUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export function compareFlags(a: Flag, b: Flag): number {
return a.active && b.active
? a.text.localeCompare(b.text)
: a.active
? -1
: b.active
? 1
: 0;
? -1
: b.active
? 1
: 0;
}

/**
Expand Down

0 comments on commit 8f0356b

Please sign in to comment.