Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jcanotorr06/fix/lint_fix #38

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/Alerts/AlertManager.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AnimatePresence, motion } from 'framer-motion';
import { FaTimes } from 'react-icons/fa';
import useAlertStore from './../../state/alertStore';
import { AnimatePresence, motion } from "framer-motion";
import { FaTimes } from "react-icons/fa";
import useAlertStore from "./../../state/alertStore";

const AlertManager = () => {
const { isAlertOpen, closeAlert, alertText, alertType } = useAlertStore()
Expand Down
8 changes: 4 additions & 4 deletions src/components/Email/Address.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { type FC, Fragment } from 'react'
import { useQuery } from '@tanstack/react-query'
import { type FC, Fragment } from "react"
import { useQuery } from "@tanstack/react-query"
import { FaCopy } from "react-icons/fa"
import { getEmailAddress } from '../../queries/email'
import useAlertStore from '../../state/alertStore'
import { getEmailAddress } from "../../queries/email"
import useAlertStore from "../../state/alertStore"

const Address:FC = () => {

Expand Down
14 changes: 6 additions & 8 deletions src/components/Email/Inbox.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { type FC, Fragment } from 'react'
import { useQuery } from '@tanstack/react-query'
import { getEmailAddress, getMailbox } from '../../queries/email'
import Loading from '../utils/Loading'
import { HiEnvelopeOpen } from 'react-icons/hi2'
import * as dayjs from "dayjs"
import Message from './Message'
import useEmailStore from '../../state/emailStore'
import { type FC, Fragment } from "react"
import { useQuery } from "@tanstack/react-query"
import { getEmailAddress, getMailbox } from "../../queries/email"
import Loading from "../utils/Loading"
import { HiEnvelopeOpen } from "react-icons/hi2"
import Message from "./Message"

const Inbox:FC = () => {

Expand Down
6 changes: 3 additions & 3 deletions src/components/Email/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react'
import type { Mailbox } from '../../types/mailbox'
import type { FC } from "react"
import type { Mailbox } from "../../types/mailbox"
import * as dayjs from "dayjs"
import useEmailStore from '../../state/emailStore'
import useEmailStore from "../../state/emailStore"

type Props = {
email: Mailbox
Expand Down
16 changes: 8 additions & 8 deletions src/components/Email/MessageDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useQuery } from '@tanstack/react-query'
import { Interweave } from 'interweave'
import { type FC } from 'react'
import { FaFile, FaFileDownload, FaTimes } from 'react-icons/fa'
import { useQuery } from "@tanstack/react-query"
import { Interweave } from "interweave"
import { type FC } from "react"
import { FaFileDownload, FaTimes } from "react-icons/fa"
import * as dayjs from "dayjs"
import { getEmailAddress, getMailboxMessage } from '../../queries/email'
import useEmailStore from '../../state/emailStore'
import Loading from '../utils/Loading'
import type { Mailbox, MailboxMessageAttachment } from '../../types/mailbox'
import { getEmailAddress, getMailboxMessage } from "../../queries/email"
import useEmailStore from "../../state/emailStore"
import Loading from "../utils/Loading"
import type { Mailbox, MailboxMessageAttachment } from "../../types/mailbox"

const MessageDetails:FC = () => {
const { email, closeEmail } = useEmailStore()
Expand Down
8 changes: 4 additions & 4 deletions src/components/Email/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { default as Address } from './Address';
export { default as Inbox } from './Inbox';
export { default as Message } from './Message';
export { default as MessageDetails } from './MessageDetails';
export { default as Address } from "./Address";
export { default as Inbox } from "./Inbox";
export { default as Message } from "./Message";
export { default as MessageDetails } from "./MessageDetails";
4 changes: 2 additions & 2 deletions src/components/Landing/ToolCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type FC } from 'react'
import Link from 'next/link'
import { type FC } from "react"
import Link from "next/link"

type Props = {
name: string,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Landing/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as ToolCard } from './ToolCard';
export { default as ToolCard } from "./ToolCard";
2 changes: 1 addition & 1 deletion src/components/Layouts/BaseLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const BaseLayout:FC<Props> = ({children}:Props) => {
}
variants={variants}
initial={false}
className={`flex flex-grow bg-base-200 z-10 h-full p-4`}
className={"flex flex-grow bg-base-200 z-10 h-full p-4"}
>
{children}
</motion.section>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Modals/ModalManager.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { AnimatePresence, motion } from 'framer-motion'
import React, { lazy } from 'react'
import { AnimatePresence, motion } from "framer-motion"
import React, { lazy } from "react"
import { FaTimes } from "react-icons/fa"
import useModalStore from '../../state/modalStore'
import LazyLoading from '../utils/LazyLoading'
import useModalStore from "../../state/modalStore"
import LazyLoading from "../utils/LazyLoading"

const SearchModal = lazy(() => import('./SearchModal'))
const SearchModal = lazy(() => import("./SearchModal"))

export type ModalTypes = "search" | "alert" | ""

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modals/SearchModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React from "react"

const SearchModal = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FC , useEffect } from "react"
import { AnimatePresence, motion } from "framer-motion"
import { useSidebarStore } from "../../state"
import { HiMoon, HiSun, HiHome, HiEnvelope, HiMagnifyingGlass, HiChevronLeft, HiChevronRight } from 'react-icons/hi2';
import { HiMoon, HiSun, HiHome, HiEnvelope, HiMagnifyingGlass, HiChevronLeft, HiChevronRight } from "react-icons/hi2";
import { BsFileTextFill } from "react-icons/bs"
import { themeChange } from "theme-change";
import Link from "next/link";
Expand Down
4 changes: 2 additions & 2 deletions src/components/utils/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type FC } from 'react'
import { Oval } from 'react-loader-spinner'
import { type FC } from "react"
import { Oval } from "react-loader-spinner"

const Loading:FC = () => {
return (
Expand Down
2 changes: 0 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { DefaultSeo } from "next-seo";
import { type AppType } from "next/dist/shared/lib/utils";
import { Fragment, useEffect } from "react";
import BaseLayout from "../components/Layouts/BaseLayout";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

import "../styles/globals.css";
import { themeChange } from "theme-change";

const queryClient = new QueryClient({
/* defaultOptions: {
Expand Down
1 change: 0 additions & 1 deletion src/queries/email.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type QueryFunction } from "@tanstack/react-query";
import type { Mailbox, MailboxMessage } from "../types/mailbox";
import { getDecodedLocalStorage, setEncodedLocalStorage } from './../utils/storage';

const url = "https://www.1secmail.com/api/v1/"

Expand Down
8 changes: 4 additions & 4 deletions src/state/alertStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import create from 'zustand';
import { devtools } from 'zustand/middleware';
import create from "zustand";
import { devtools } from "zustand/middleware";

type Alert = "info" | "success" | "warning" | "error"

Expand All @@ -15,10 +15,10 @@ const useAlertStore = create<AlertStore>()(
devtools(
(set) => ({
isAlertOpen: false,
alertText: '',
alertText: "",
alertType: "info",
openAlert: (text: string, type: Alert) => set(() => ({ isAlertOpen: true, alertText: text, alertType: type })),
closeAlert: () => set(() => ({ isAlertOpen: false, alertText: '', alertType: "info" })),
closeAlert: () => set(() => ({ isAlertOpen: false, alertText: "", alertType: "info" })),
})
)
)
Expand Down
6 changes: 3 additions & 3 deletions src/state/emailStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import create from 'zustand';
import { devtools } from 'zustand/middleware';
import type { Mailbox } from '../types/mailbox';
import create from "zustand";
import { devtools } from "zustand/middleware";
import type { Mailbox } from "../types/mailbox";

type EmailStore = {
email: Mailbox | null;
Expand Down
2 changes: 1 addition & 1 deletion src/state/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as useSidebarStore } from './sidebarStore';
export { default as useSidebarStore } from "./sidebarStore";
10 changes: 5 additions & 5 deletions src/state/modalStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import create from 'zustand';
import { devtools } from 'zustand/middleware';
import type { ModalTypes } from '../components/Modals/ModalManager';
import create from "zustand";
import { devtools } from "zustand/middleware";
import type { ModalTypes } from "../components/Modals/ModalManager";

type ModalStore = {
isModalOpen: boolean;
Expand All @@ -13,9 +13,9 @@ const useModalStore = create<ModalStore>()(
devtools(
(set) => ({
isModalOpen: false,
modalId: '',
modalId: "",
openModal: (id: ModalTypes) => set(() => ({ isModalOpen: true, modalId: id })),
closeModal: () => set(() => ({ isModalOpen: false, modalId: '' })),
closeModal: () => set(() => ({ isModalOpen: false, modalId: "" })),
})
)
)
Expand Down
4 changes: 2 additions & 2 deletions src/state/sidebarStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import create from 'zustand';
import { devtools } from 'zustand/middleware';
import create from "zustand";
import { devtools } from "zustand/middleware";

type SidebarStore = {
isSidebarOpen: boolean;
Expand Down