diff --git a/apps/app/components/command-palette/index.tsx b/apps/app/components/command-palette/index.tsx index fbb8a17d223..2126e393afe 100644 --- a/apps/app/components/command-palette/index.tsx +++ b/apps/app/components/command-palette/index.tsx @@ -13,8 +13,8 @@ import { ClipboardDocumentListIcon, MagnifyingGlassIcon, } from "@heroicons/react/24/outline"; -import useTheme from "hooks/useTheme"; -import useToast from "hooks/useToast"; +import useTheme from "hooks/use-theme"; +import useToast from "hooks/use-toast"; import useUser from "hooks/use-user"; // services import userService from "services/user.service"; diff --git a/apps/app/components/common/bulk-delete-issues-modal.tsx b/apps/app/components/common/bulk-delete-issues-modal.tsx index 0bac7d80737..c1115042843 100644 --- a/apps/app/components/common/bulk-delete-issues-modal.tsx +++ b/apps/app/components/common/bulk-delete-issues-modal.tsx @@ -12,7 +12,7 @@ import { FolderIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import issuesServices from "services/issues.service"; import projectService from "services/project.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // headless ui // ui import { Button } from "components/ui"; diff --git a/apps/app/components/common/existing-issues-list-modal.tsx b/apps/app/components/common/existing-issues-list-modal.tsx index 086d19fbdf7..5efd759196a 100644 --- a/apps/app/components/common/existing-issues-list-modal.tsx +++ b/apps/app/components/common/existing-issues-list-modal.tsx @@ -8,7 +8,7 @@ import { Controller, SubmitHandler, useForm } from "react-hook-form"; // hooks import { Combobox, Dialog, Transition } from "@headlessui/react"; import { MagnifyingGlassIcon, RectangleStackIcon } from "@heroicons/react/24/outline"; -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import projectService from "services/project.service"; // headless ui diff --git a/apps/app/components/emoji-icon-picker/index.tsx b/apps/app/components/emoji-icon-picker/index.tsx index 5157c889ca4..4d2b98ceece 100644 --- a/apps/app/components/emoji-icon-picker/index.tsx +++ b/apps/app/components/emoji-icon-picker/index.tsx @@ -9,7 +9,7 @@ import emojis from "./emojis.json"; import { getRecentEmojis, saveRecentEmoji } from "./helpers"; import { getRandomEmoji } from "helpers/functions.helper"; // hooks -import useOutsideClickDetector from "hooks/useOutsideClickDetector"; +import useOutsideClickDetector from "hooks/use-outside-click-detector"; const tabOptions = [ { diff --git a/apps/app/components/onboarding/invite-members.tsx b/apps/app/components/onboarding/invite-members.tsx index 266917ccf2b..efcdd650ce0 100644 --- a/apps/app/components/onboarding/invite-members.tsx +++ b/apps/app/components/onboarding/invite-members.tsx @@ -1,6 +1,6 @@ // types import { useForm } from "react-hook-form"; -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; import workspaceService from "services/workspace.service"; import { IUser } from "types"; // ui components diff --git a/apps/app/components/onboarding/user-details.tsx b/apps/app/components/onboarding/user-details.tsx index 1184875a4d7..f2755a1f4dd 100644 --- a/apps/app/components/onboarding/user-details.tsx +++ b/apps/app/components/onboarding/user-details.tsx @@ -3,7 +3,7 @@ import { useEffect } from "react"; import { useForm } from "react-hook-form"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import userService from "services/user.service"; // ui diff --git a/apps/app/components/onboarding/workspace.tsx b/apps/app/components/onboarding/workspace.tsx index 630c4425f57..8a4b4b0163c 100644 --- a/apps/app/components/onboarding/workspace.tsx +++ b/apps/app/components/onboarding/workspace.tsx @@ -9,7 +9,7 @@ import { Controller, useForm } from "react-hook-form"; import { Tab } from "@headlessui/react"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import workspaceService from "services/workspace.service"; // ui diff --git a/apps/app/components/project/confirm-project-deletion.tsx b/apps/app/components/project/confirm-project-deletion.tsx index 68c849f8314..a55df380562 100644 --- a/apps/app/components/project/confirm-project-deletion.tsx +++ b/apps/app/components/project/confirm-project-deletion.tsx @@ -9,7 +9,7 @@ import { ExclamationTriangleIcon } from "@heroicons/react/24/outline"; import type { IProject, IWorkspace } from "types"; import projectService from "services/project.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // icons // ui import { Button, Input } from "components/ui"; diff --git a/apps/app/components/project/create-project-modal.tsx b/apps/app/components/project/create-project-modal.tsx index 3c39898101b..f1c14bda6d2 100644 --- a/apps/app/components/project/create-project-modal.tsx +++ b/apps/app/components/project/create-project-modal.tsx @@ -11,7 +11,7 @@ import { Dialog, Transition } from "@headlessui/react"; import projectServices from "services/project.service"; import workspaceService from "services/workspace.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // ui import { Button, Input, TextArea, CustomSelect } from "components/ui"; // components diff --git a/apps/app/components/project/cycles/cycle-detail-sidebar/index.tsx b/apps/app/components/project/cycles/cycle-detail-sidebar/index.tsx index 83a1dc8880b..08ef636dd3c 100644 --- a/apps/app/components/project/cycles/cycle-detail-sidebar/index.tsx +++ b/apps/app/components/project/cycles/cycle-detail-sidebar/index.tsx @@ -11,7 +11,7 @@ import { CalendarDaysIcon, ChartPieIcon, LinkIcon, UserIcon } from "@heroicons/r // services import cyclesService from "services/cycles.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // ui import { Loader } from "components/ui"; // helpers diff --git a/apps/app/components/project/issues/confirm-issue-deletion.tsx b/apps/app/components/project/issues/confirm-issue-deletion.tsx index 08884d06d50..a9f6895433a 100644 --- a/apps/app/components/project/issues/confirm-issue-deletion.tsx +++ b/apps/app/components/project/issues/confirm-issue-deletion.tsx @@ -12,7 +12,7 @@ import { CYCLE_ISSUES, PROJECT_ISSUES_LIST, MODULE_ISSUES } from "constants/fetc // services import issueServices from "services/issues.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // icons // ui import { Button } from "components/ui"; @@ -54,10 +54,10 @@ const ConfirmIssueDeletion: React.FC = (props) => { mutate( PROJECT_ISSUES_LIST(workspaceSlug as string, projectId), (prevData) => ({ - ...(prevData as IssueResponse), - results: prevData?.results.filter((i) => i.id !== data.id) ?? [], - count: (prevData?.count as number) - 1, - }), + ...(prevData as IssueResponse), + results: prevData?.results.filter((i) => i.id !== data.id) ?? [], + count: (prevData?.count as number) - 1, + }), false ); diff --git a/apps/app/components/project/issues/create-update-issue-modal/index.tsx b/apps/app/components/project/issues/create-update-issue-modal/index.tsx index b0b49715746..719aa21c0a6 100644 --- a/apps/app/components/project/issues/create-update-issue-modal/index.tsx +++ b/apps/app/components/project/issues/create-update-issue-modal/index.tsx @@ -20,7 +20,7 @@ import modulesService from "services/modules.service"; import issuesServices from "services/issues.service"; // hooks import useUser from "hooks/use-user"; -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // ui import { Button, Input, Loader } from "components/ui"; // components diff --git a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/index.tsx b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/index.tsx index 94b33df6c0c..1c14e2562c7 100644 --- a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/index.tsx +++ b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/index.tsx @@ -21,7 +21,7 @@ import { // types import type { ICycle, IIssue, IIssueLabels } from "types"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import issuesServices from "services/issues.service"; // components diff --git a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocked.tsx b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocked.tsx index 119f3528803..789e1a24a21 100644 --- a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocked.tsx +++ b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocked.tsx @@ -11,7 +11,7 @@ import { Combobox, Dialog, Transition } from "@headlessui/react"; import { FolderIcon, MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/24/outline"; import issuesService from "services/issues.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // headless ui // ui import { Button } from "components/ui"; diff --git a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocker.tsx b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocker.tsx index e52576dd1dd..1e3d9c19f17 100644 --- a/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocker.tsx +++ b/apps/app/components/project/issues/issue-detail/issue-detail-sidebar/select-blocker.tsx @@ -10,7 +10,7 @@ import { SubmitHandler, useForm, UseFormWatch } from "react-hook-form"; import { Combobox, Dialog, Transition } from "@headlessui/react"; import { FolderIcon, MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/24/outline"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import issuesServices from "services/issues.service"; // headless ui diff --git a/apps/app/components/project/modules/module-detail-sidebar/index.tsx b/apps/app/components/project/modules/module-detail-sidebar/index.tsx index d0d3669705a..62c810103ce 100644 --- a/apps/app/components/project/modules/module-detail-sidebar/index.tsx +++ b/apps/app/components/project/modules/module-detail-sidebar/index.tsx @@ -16,7 +16,7 @@ import { } from "@heroicons/react/24/outline"; import modulesService from "services/modules.service"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // components import SelectLead from "components/project/modules/module-detail-sidebar/select-lead"; import SelectMembers from "components/project/modules/module-detail-sidebar/select-members"; diff --git a/apps/app/components/project/send-project-invitation-modal.tsx b/apps/app/components/project/send-project-invitation-modal.tsx index b43b3361b33..2d6e38355f7 100644 --- a/apps/app/components/project/send-project-invitation-modal.tsx +++ b/apps/app/components/project/send-project-invitation-modal.tsx @@ -11,7 +11,7 @@ import { Dialog, Transition, Listbox } from "@headlessui/react"; import { ChevronDownIcon, CheckIcon } from "@heroicons/react/20/solid"; import { Button, Select, TextArea } from "components/ui"; // hooks -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import projectService from "services/project.service"; import workspaceService from "services/workspace.service"; diff --git a/apps/app/components/project/sidebar-list.tsx b/apps/app/components/project/sidebar-list.tsx index ede4dbcd1a2..17fbb84c84e 100644 --- a/apps/app/components/project/sidebar-list.tsx +++ b/apps/app/components/project/sidebar-list.tsx @@ -14,8 +14,8 @@ import { } from "@heroicons/react/24/outline"; import { CyclesIcon } from "components/icons"; // hooks -import useToast from "hooks/useToast"; -import useTheme from "hooks/useTheme"; +import useToast from "hooks/use-toast"; +import useTheme from "hooks/use-theme"; // services import projectService from "services/project.service"; // components diff --git a/apps/app/components/sidebar/projects-list.tsx b/apps/app/components/sidebar/projects-list.tsx index 640cc9d166b..f98cbff70ab 100644 --- a/apps/app/components/sidebar/projects-list.tsx +++ b/apps/app/components/sidebar/projects-list.tsx @@ -7,7 +7,7 @@ import useSWR from "swr"; // hooks import { Disclosure, Transition } from "@headlessui/react"; import { ChevronDownIcon, PlusIcon } from "@heroicons/react/24/outline"; -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // services import projectService from "services/project.service"; // components diff --git a/apps/app/components/toast-alert/index.tsx b/apps/app/components/toast-alert/index.tsx index 383ad327cfc..5d0c0123c98 100644 --- a/apps/app/components/toast-alert/index.tsx +++ b/apps/app/components/toast-alert/index.tsx @@ -7,7 +7,7 @@ import { XCircleIcon, XMarkIcon, } from "@heroicons/react/24/outline"; -import useToast from "hooks/useToast"; +import useToast from "hooks/use-toast"; // icons const ToastAlerts = () => { diff --git a/apps/app/components/ui/text-area/index.tsx b/apps/app/components/ui/text-area/index.tsx index bae591877a3..8cda2907786 100644 --- a/apps/app/components/ui/text-area/index.tsx +++ b/apps/app/components/ui/text-area/index.tsx @@ -1,10 +1,8 @@ import React, { useState, useRef, useEffect } from "react"; -import { Props } from "./types"; -// commons // types +import { Props } from "./types"; -// TODO: Remove this Hook from hooks folder and integrate this logic with component. // Updates the height of a