Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine D committed Nov 26, 2024
1 parent 4e0fe9d commit 82f4490
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
13 changes: 3 additions & 10 deletions src/app/(dashboard)/admin/mails/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
import styles from './style.module.scss';
import { useState } from 'react';

import { useAppDispatch } from '@/lib/hooks';
import { MailType } from '@/types';
import { Button, Checkbox, Input, Select, Title } from '@/components/UI';
import { Button, Checkbox, Select, Title } from '@/components/UI';
// eslint-disable-next-line import/named
import { animated, useTransition } from '@react-spring/web';
import { sendGeneralMails } from '@/modules/admin';
import generalMailImg from '@/../public/images/mails/generalmail.webp';
import focusedMailImg from '@/../public/images/mails/focusedmail.webp';
import customMailImg from '@/../public/images/mails/custommail.webp';

const Mails = () => {
const dispatch = useAppDispatch();

const [step, setStep] = useState(1);
const [mailType, setMailType] = useState<MailType>();
const [mailContent, setMailContent] = useState<string>('');
const [mailTemplate, setMailTemplate] = useState<string>('');
//const [mailTemplate, setMailTemplate] = useState<string>('');
const [preview, setPreview] = useState<boolean>(false);

const transitions = useTransition(step, {
Expand All @@ -44,23 +40,20 @@ const Mails = () => {
<MailCard
title="Mail Général"
onClick={() => {
setMailType(MailType.general);
setStep(step + 1);
}}
imgSrc={generalMailImg.src}
/>
<MailCard
title="Mail Ciblé"
onClick={() => {
setMailType(MailType.focused);
setStep(step + 2);
}}
imgSrc={focusedMailImg.src}
/>
<MailCard
title="Mail Custom"
onClick={() => {
setMailType(MailType.custom);
setStep(step + 3);
}}
imgSrc={customMailImg.src}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/admin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createSlice } from '@reduxjs/toolkit';
import { API } from '@/utils/api';
import { AdminPartner, AdminTournament, AdminItem, Badge, MailType } from '@/types';
import { AdminPartner, AdminTournament, AdminItem, Badge } from '@/types';
import {
getPartnerLogoName,
PARTNER_FOLDER,
Expand Down
10 changes: 0 additions & 10 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,3 @@ export interface Badge {
commissionRole?: CommissionRole;
image?: string;
}

export enum MailType {
general = 'general',
focused = 'focused',
custom = 'custom',
}

export interface Mail {
type: MailType;
}

0 comments on commit 82f4490

Please sign in to comment.