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

refactor: new context for issue view #187

Merged
merged 1 commit into from
Jan 20, 2023
Merged
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
4 changes: 2 additions & 2 deletions apps/app/components/command-palette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/common/bulk-delete-issues-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/common/existing-issues-list-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/emoji-icon-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/onboarding/invite-members.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/onboarding/user-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/onboarding/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/confirm-project-deletion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/create-project-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions apps/app/components/project/issues/confirm-issue-deletion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -54,10 +54,10 @@ const ConfirmIssueDeletion: React.FC<Props> = (props) => {
mutate<IssueResponse>(
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
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/project/sidebar-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/sidebar/projects-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/toast-alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down
4 changes: 1 addition & 3 deletions apps/app/components/ui/text-area/index.tsx
Original file line number Diff line number Diff line change
@@ -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 <textarea> when the value changes.
const useAutosizeTextArea = (textAreaRef: HTMLTextAreaElement | null, value: any) => {
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { USER_WORKSPACES } from "constants/fetch-keys";
// services
import workspaceService from "services/workspace.service";
// hooks
import useToast from "hooks/useToast";
import useToast from "hooks/use-toast";
// icons
// ui
import { Button, Input } from "components/ui";
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/workspace/help-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
CommentIcon,
} from "components/icons";
// hooks
import useTheme from "hooks/useTheme";
import useOutsideClickDetector from "hooks/useOutsideClickDetector";
import useTheme from "hooks/use-theme";
import useOutsideClickDetector from "hooks/use-outside-click-detector";

const helpOptions = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import workspaceService from "services/workspace.service";
// ui
import { Button, Input, Select } from "components/ui";
// hooks
import useToast from "hooks/useToast";
import useToast from "hooks/use-toast";
// types
import { IWorkspaceMemberInvitation } from "types";
// fetch keys
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/workspace/sidebar-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Link from "next/link";
import { ChevronDownIcon, PlusIcon } from "@heroicons/react/24/outline";
// hooks
import useUser from "hooks/use-user";
import useTheme from "hooks/useTheme";
import useTheme from "hooks/use-theme";
import useWorkspaces from "hooks/use-workspaces";
// services
import userService from "services/user.service";
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/workspace/sidebar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
RectangleStackIcon,
} from "@heroicons/react/24/outline";
// hooks
import useTheme from "hooks/useTheme";
import useTheme from "hooks/use-theme";

const workspaceLinks = (workspaceSlug: string) => [
{
Expand Down
Loading