Skip to content

Commit

Permalink
Removed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Maawan committed Mar 14, 2024
1 parent 967a598 commit 8422903
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 4 additions & 7 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ export function Sidebar({
const pathArray = findPathToContent(fullCourseContent, contentId);
if (pathArray) {
return `/courses/${courseId}/${pathArray.join('/')}`;

}
};


const renderContent = (contents: any) => {
return contents.map((content: any) => {
Expand Down Expand Up @@ -248,7 +246,6 @@ function Check({ content , pathCheck } : { content: any , pathCheck : any}) {
const [currentPath] = useState(usePathname());
const [markAsComplete , setMarkAsComplete] = useRecoilState(markAsCompleteAtom);


return (
<>
<input
Expand All @@ -257,10 +254,10 @@ function Check({ content , pathCheck } : { content: any , pathCheck : any}) {
setCompleted(!completed);
handleMarkAsCompleted(!completed, content.id);
setMarkAsComplete({
isValid : true,
path : currentPath,
isCompleted : !completed
})
isValid: true,
path: currentPath,
isCompleted: !completed
});
e.stopPropagation();
}}
type="checkbox"
Expand Down
8 changes: 4 additions & 4 deletions src/store/atoms/markAsComplete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {atom} from "recoil";
import {atom} from 'recoil';

interface markAsCompleteParams {
isValid : boolean
Expand All @@ -7,6 +7,6 @@ interface markAsCompleteParams {
}

export const markAsCompleteAtom = atom<markAsCompleteParams>({
key : "markAsCompleteAtom",
default : {isValid : false}
})
key: 'markAsCompleteAtom',
default: {isValid: false}
});

0 comments on commit 8422903

Please sign in to comment.