Skip to content

Commit ba7c33f

Browse files
committed
Lint
1 parent dc574f1 commit ba7c33f

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { addWidget, modifyBB, removeWidget, WIDGETS } from '@/module/homepage';
1010
import { useEffect, useMemo, useState } from 'react';
1111
import { isClientSide } from '@/utils/environment';
1212
import Page from '@/components/utilities/Page';
13-
import { useAppTranslation } from "@/lib/i18n";
13+
import { useAppTranslation } from '@/lib/i18n';
1414

1515
function AdditionalNavbarComponent({
1616
modifyingLayout,

src/app/ues/[code]/Comments.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ import upvoteComment from '@/api/comment/upvote';
1414
import { unUpvoteComment } from '@/api/comment/unUpvote';
1515
import { useAPI } from '@/api/api';
1616

17-
function CommentEditorFooter(comment: Comment, onUpdate: (text: string, anonymous: boolean) => void, t: TFunction) {
17+
function CommentEditorFooter(comment: Comment, onUpdate: (text: string, anonymous: boolean) => void) {
1818
return function CommentEditorFooter({ text, disable }: { text: string; disable: () => void }) {
1919
const [anonymous, setAnonymous] = useState<boolean>(comment.isAnonymous);
2020
const { t } = useAppTranslation();
2121
return (
2222
<div className={styles.commentEditorFooter}>
2323
<div>
24-
{t('ues:detailed.comments.write.anonymous')} : <input type={'checkbox'} checked={anonymous} onChange={() => setAnonymous(!anonymous)} />
24+
{t('ues:detailed.comments.write.anonymous')} :{' '}
25+
<input type={'checkbox'} checked={anonymous} onChange={() => setAnonymous(!anonymous)} />
2526
</div>
2627
<Button
2728
className={styles.button}
@@ -116,15 +117,11 @@ export default function Comments({ code }: { code: string }) {
116117
textClassName={styles.text}
117118
text={comment.body}
118119
enabled={comment.author?.id === user.id}
119-
EditingFooter={CommentEditorFooter(
120-
comment,
121-
async (text, anonymous) => {
122-
const updatedComment = await editComment(api, comment.id, text, anonymous).toPromise();
123-
if (!updatedComment) return;
124-
setComment(i, updatedComment);
125-
},
126-
t,
127-
)}
120+
EditingFooter={CommentEditorFooter(comment, async (text, anonymous) => {
121+
const updatedComment = await editComment(api, comment.id, text, anonymous).toPromise();
122+
if (!updatedComment) return;
123+
setComment(i, updatedComment);
124+
})}
128125
NormalViewFooter={CommentFooter(code, comment, comment.author?.id === user.id, t, (updatedComment) =>
129126
setComment(i, updatedComment),
130127
)}

src/lib/i18n.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import users from '../../public/locales/fr/users.json';
66
import goTo from '../../public/locales/fr/goTo.json';
77
import auth from '../../public/locales/fr/auth.json';
88
import assos from '../../public/locales/fr/assos.json';
9-
import cookies from '../../public/locales/fr/cookies.json';
109
import { type InitOptions } from 'i18next';
1110

1211
declare module 'i18next' {
@@ -24,7 +23,6 @@ declare module 'i18next' {
2423
goTo: typeof goTo;
2524
auth: typeof auth;
2625
assos: typeof assos;
27-
cookies: typeof cookies;
2826
};
2927
}
3028
}

0 commit comments

Comments
 (0)