Skip to content

Commit 6bf729d

Browse files
committed
refactor: clean warnings, remove unused
1 parent 5433275 commit 6bf729d

File tree

8 files changed

+7
-15
lines changed

8 files changed

+7
-15
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"bcrypt": "5.0.1",
4242
"dotenv-safe": "8.2.0",
4343
"framer-motion": "4.1.17",
44+
"joi": "17.4.2",
4445
"jsonwebtoken": "8.5.1",
4546
"next": "11.1.2",
4647
"react": "17.0.2",

src/features/auth/backend/confirmationEmail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
style="border-radius: 6px"
261261
>
262262
<a
263-
href="[**website_url**]"
263+
href="[**WEBSITE_URL**]/admin/auth/confirmation?token=[**TOKEN**]"
264264
target="_blank"
265265
style="
266266
display: inline-block;

src/features/auth/backend/sendConfirmationMail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const sendConfirmationMail = async (email: string, token: string) => {
1616
mail.setApiKey(process.env.SENDGRID_API_KEY);
1717

1818
await mail.send({
19-
19+
to: email,
2020
from: process.env.MAIL_FROM,
2121
subject: `Confirmation d'inscription`,
2222
text: `Confirmation d'inscription`,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './serviceConfirmation';
22
export * from './serviceSignin';
3-
export * from './signup';
3+
export * from './serviceSignup';
File renamed without changes.

src/features/auth/components/Confirmation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const BoxConfirmation = () => {
1212
const router = useRouter();
1313
const { token } = router.query;
1414

15-
const { data, isFetching } = useConfirmQuery(token as string);
15+
useConfirmQuery(token as string);
1616

1717
return router.query?.token ? (
1818
<div>Votre compte a bien été créé</div>

src/features/auth/components/FormSignup.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ import React from 'react';
33
import { yupResolver } from '@hookform/resolvers/yup';
44
import {
55
Button,
6-
chakra,
76
FormControl,
87
FormErrorMessage,
9-
FormHelperText,
108
Icon,
11-
IconButton,
129
Input,
1310
InputGroup,
1411
InputLeftElement,
@@ -54,7 +51,7 @@ export const FormSignup = () => {
5451
});
5552
const [
5653
signup, // This is the mutation trigger
57-
{ isLoading, data: token, error, status }, // This is the destructured mutation result
54+
{ isLoading, error, status }, // This is the destructured mutation result
5855
] = useSignupMutation();
5956

6057
const bgFormColor = useColorModeValue(`gray.100`, `gray.700`);

src/features/auth/components/PasswordsInputs.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import { FC, useState } from 'react';
2-
import { FaUserAlt, FaLock, FaSearch } from 'react-icons/fa';
2+
import { FaLock, FaSearch } from 'react-icons/fa';
33
import {
4-
Button,
54
chakra,
65
FormControl,
76
FormErrorMessage,
8-
FormHelperText,
9-
Icon,
107
IconButton,
118
Input,
129
InputGroup,
1310
InputLeftElement,
1411
InputRightElement,
15-
Link,
16-
Stack,
17-
useColorModeValue,
1812
} from '@chakra-ui/react';
1913
import { useFormContext } from 'react-hook-form';
2014

0 commit comments

Comments
 (0)