Skip to content

Commit

Permalink
Cleanup sonarqube issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gallant committed Oct 28, 2024
1 parent 7d6c95d commit 69c7448
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Api/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const getProfile = async (): Promise<Profile> => {
};

if (value == null) {
await setProfile(defaultProfileValues);
setProfile(defaultProfileValues);
return defaultProfileValues;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Api/Statistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const getStatistics = async (): Promise<Statistics> => {
numHintsUsed: 0,
numWrongCellsPlayed: 0,
};
await saveStatisitics(statistics);
saveStatisitics(statistics);
return statistics;
}
return value;
Expand Down
2 changes: 1 addition & 1 deletion app/Components/SudokuBoard/SudokuBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
finishSudokuGame,
handlePause,
saveGame,
isValueCorrect,
} from "./Functions/BoardFunctions";
import {
areCellsInSameBox,
Expand All @@ -13,7 +14,6 @@ import {
} from "./sudoku";
import { ActivityIndicator } from "react-native-paper";
import NumberControl from "./Components/NumberControl";
import { isValueCorrect } from "./Functions/BoardFunctions";
import Cell from "./Components/Cell";
import ActionRow from "./Components/ActionRow";
import { generateGame } from "./Functions/generateGame";
Expand Down
1 change: 0 additions & 1 deletion app/Functions/LocalDatabase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { SudokuStrategy } from "sudokuru";
import { GameDifficulty } from "../Components/SudokuBoard/Functions/Difficulty";
import { Puzzle } from "../Api/Puzzle.Types";

Expand Down
6 changes: 1 addition & 5 deletions app/Pages/Lesson.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,11 @@ const Lesson = (props: { route: { params: { params: any } } }) => {
}, [])
);

async function saveUserLearnedLessons(learnedLessons: string[]) {
await saveLearnedLessons(learnedLessons);
}

const clickCheckMark = () => {
if (!learnedLessons.includes(name)) {
learnedLessons.push(name);
updateLearnedLessons(learnedLessons);
saveUserLearnedLessons(learnedLessons);
saveLearnedLessons(learnedLessons);
}
navigation.navigate("LearnPage");
};
Expand Down

0 comments on commit 69c7448

Please sign in to comment.