Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AuenKr committed Oct 5, 2024
1 parent 2c2bc56 commit 909ff6f
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 24 deletions.
6 changes: 3 additions & 3 deletions src/actions/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const changePasswordHandler = async (
},
data: {
password: hashedPassword,
token
token,
},
});

Expand All @@ -106,12 +106,12 @@ const changePasswordHandler = async (
} catch (error) {
console.error('Error updating password user:', error);
return {
error: 'Fail to update password'
error: 'Fail to update password',
};
}
};

export const changePassword = createSafeAction(
ChangePasswordSchema,
changePasswordHandler,
);
);
2 changes: 1 addition & 1 deletion src/actions/user/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const ChangePasswordSchema = z.object({
confirmpassword: z
.string({ message: 'Required' })
.min(6, { message: 'Min length 6 required' }),
});
});
2 changes: 1 addition & 1 deletion src/actions/user/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ interface ReturnChangePassword {
export type ReturnTypeChangePassword = ActionState<
InputTypeChangePassword,
ReturnChangePassword
>;
>;
2 changes: 1 addition & 1 deletion src/app/password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async function PasswordChangePage() {
}
return (
<section className="wrapper relative flex min-h-screen items-center justify-center overflow-hidden antialiased">
<PasswordChange />
<PasswordChange />
</section>
);
}
5 changes: 4 additions & 1 deletion src/components/ContentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { formatTime } from '@/lib/utils';
import VideoThumbnail from './videothumbnail';
import CardComponent from './CardComponent';
import { motion } from 'framer-motion';
import { KeyboardEvent } from 'react';

export const ContentCard = ({
title,
Expand Down Expand Up @@ -33,7 +34,9 @@ export const ContentCard = ({
onClick={onClick}
tabIndex={0}
role="button"
onKeyDown={(e:React.KeyboardEvent) => (['Enter', ' '].includes(e.key) && onClick())}
onKeyDown={(e: KeyboardEvent) =>
['Enter', ' '].includes(e.key) && onClick()
}
className={`group relative flex h-fit w-full max-w-md cursor-pointer flex-col gap-2 rounded-2xl transition-all duration-300 hover:-translate-y-2`}
>
{markAsCompleted && (
Expand Down
18 changes: 9 additions & 9 deletions src/components/CourseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export const CourseView = ({
rest: string[];
course: any;
courseContent:
| {
folder: true;
value: ChildCourseContent[];
}
| {
folder: false;
value: ChildCourseContent;
}
| null;
| {
folder: true;
value: ChildCourseContent[];
}
| {
folder: false;
value: ChildCourseContent;
}
| null;
nextContent: any;
searchParams: QueryParams;
possiblePath: string;
Expand Down
4 changes: 3 additions & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ export function Sidebar({
variants={sidebarVariants}
className="fixed right-0 top-0 z-[99999] flex h-screen w-full flex-col gap-4 overflow-y-auto rounded-r-lg border-l border-primary/10 bg-neutral-50 dark:bg-neutral-900 md:max-w-[30vw]"
>
<div className="sticky top-0 z-10 flex items-center justify-between border-b border-primary/10 bg-neutral-50 p-5 dark:bg-neutral-900"> <h4 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">
<div className="sticky top-0 z-10 flex items-center justify-between border-b border-primary/10 bg-neutral-50 p-5 dark:bg-neutral-900">
{' '}
<h4 className="text-xl font-bold tracking-tighter text-primary lg:text-2xl">
Course Content
</h4>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/components/comment/CommentVoteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ const CommentVoteForm: React.FC<CommentVoteFormProps> = ({
);
};

export default CommentVoteForm;
export default CommentVoteForm;
11 changes: 6 additions & 5 deletions src/components/posts/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ const PostCard: React.FC<IProps> = ({
</div>

{enableReply && (
<form
onSubmit={handleSubmit}
className="mt-4"
onClick={handleEditorClick}
<form
onSubmit={handleSubmit}
className="mt-4"
onClick={handleEditorClick}
>
<div data-color-mode={theme} className="flex w-full flex-col gap-4">
<MDEditor
Expand Down Expand Up @@ -255,7 +255,8 @@ const PostCard: React.FC<IProps> = ({
sessionUser={sessionUser}
reply={false}
parentAuthorName={post.author.name}
isAnswer={true} />
isAnswer={true}
/>
</div>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "preserve",
"incremental": true,
"plugins": [
{
Expand Down

0 comments on commit 909ff6f

Please sign in to comment.