refactor: imports

This commit is contained in:
LAKHAN BAHETI 2023-11-20 09:59:19 +05:30
parent f048645dc0
commit bfde0e018a
4 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,6 @@
import React, { useEffect, useRef, useState } from "react";
// next
import Image from "next/image";
// headless ui
import { Listbox, Transition } from "@headlessui/react";
// react-hook-form
@ -9,6 +11,8 @@ import { WorkspaceService } from "services/workspace.service";
import useToast from "hooks/use-toast";
// ui
import { Button, Input } from "@plane/ui";
// components
import OnboardingStepIndicator from "components/account/step-indicator";
// hooks
import useDynamicDropdownPosition from "hooks/use-dynamic-dropdown";
// icons
@ -17,11 +21,9 @@ import { Check, ChevronDown, Plus, User2, X, XCircle } from "lucide-react";
import { IUser, IWorkspace, TOnboardingSteps, TUserWorkspaceRole } from "types";
// constants
import { ROLE } from "constants/workspace";
import OnboardingStepIndicator from "components/account/step-indicator";
import { useTheme } from "next-themes";
// assets
import user1 from "public/users/user-1.png";
import user2 from "public/users/user-2.png";
import Image from "next/image";
type Props = {
finishOnboarding: () => Promise<void>;

View File

@ -1,17 +1,15 @@
import React, { useState } from "react";
import React from "react";
// hooks
import useUser from "hooks/use-user";
// components
import Invitations from "./invitations";
import DummySidebar from "components/account/sidebar";
import OnboardingStepIndicator from "components/account/step-indicator";
import { Workspace } from "./workspace";
// types
import { IWorkspace, TOnboardingSteps } from "types";
// react-hook-form
import { Controller, useForm } from "react-hook-form";
// icons
import { Workspace } from "./workspace";
type Props = {
finishOnboarding: () => Promise<void>;

View File

@ -3,12 +3,16 @@ import { useState } from "react";
import { Button, Input } from "@plane/ui";
// types
import { IUser, IWorkspace, TOnboardingSteps } from "types";
// hooks
import useToast from "hooks/use-toast";
// services
import { WorkspaceService } from "services/workspace.service";
// mobx
import { useMobxStore } from "lib/mobx/store-provider";
// constants
import { RESTRICTED_URLS } from "constants/workspace";
// react-hook-form
import { Control, Controller, FieldErrors, UseFormHandleSubmit, UseFormSetValue } from "react-hook-form";
import { WorkspaceService } from "services/workspace.service";
import useToast from "hooks/use-toast";
import { useMobxStore } from "lib/mobx/store-provider";
type Props = {
stepChange: (steps: Partial<TOnboardingSteps>) => Promise<void>;

View File

@ -70,7 +70,7 @@ export const SignInView = observer(() => {
const workspaceSlug =
userSettings?.workspace?.last_workspace_slug || userSettings?.workspace?.fallback_workspace_slug;
if (workspaceSlug) router.push(`/${workspaceSlug}`);
// else if (userSettings.workspace.invites > 0) router.push("/invitations");
else if (userSettings.workspace.invites > 0) router.push("/invitations");
else router.push("/create-workspace");
})
.catch(() => {