🔧 Configure path alias for cleaner imports (#1497)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { Controller, type SubmitHandler, useForm } from "react-hook-form"
|
||||
|
||||
import { type UserCreate, UsersService } from "@/client"
|
||||
import type { ApiError } from "@/client/core/ApiError"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "@/utils"
|
||||
import {
|
||||
Button,
|
||||
DialogActionTrigger,
|
||||
@@ -12,10 +16,6 @@ import {
|
||||
} from "@chakra-ui/react"
|
||||
import { useState } from "react"
|
||||
import { FaPlus } from "react-icons/fa"
|
||||
import { type UserCreate, UsersService } from "../../client"
|
||||
import type { ApiError } from "../../client/core/ApiError"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "../../utils"
|
||||
import { Checkbox } from "../ui/checkbox"
|
||||
import {
|
||||
DialogBody,
|
||||
|
||||
@@ -3,7 +3,8 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { FiTrash2 } from "react-icons/fi"
|
||||
import { UsersService } from "../../client"
|
||||
|
||||
import { UsersService } from "@/client"
|
||||
import {
|
||||
DialogActionTrigger,
|
||||
DialogBody,
|
||||
@@ -13,8 +14,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogRoot,
|
||||
DialogTrigger,
|
||||
} from "../../components/ui/dialog"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
} from "@/components/ui/dialog"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
|
||||
const DeleteUser = ({ id }: { id: string }) => {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
||||
@@ -13,10 +13,11 @@ import {
|
||||
} from "@chakra-ui/react"
|
||||
import { useState } from "react"
|
||||
import { FaExchangeAlt } from "react-icons/fa"
|
||||
import { type UserPublic, type UserUpdate, UsersService } from "../../client"
|
||||
import type { ApiError } from "../../client/core/ApiError"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "../../utils"
|
||||
|
||||
import { type UserPublic, type UserUpdate, UsersService } from "@/client"
|
||||
import type { ApiError } from "@/client/core/ApiError"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "@/utils"
|
||||
import { Checkbox } from "../ui/checkbox"
|
||||
import {
|
||||
DialogBody,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { IconButton } from "@chakra-ui/react"
|
||||
import { BsThreeDotsVertical } from "react-icons/bs"
|
||||
import { MenuContent, MenuRoot, MenuTrigger } from "../ui/menu"
|
||||
|
||||
import type { ItemPublic } from "../../client"
|
||||
import type { ItemPublic } from "@/client"
|
||||
import DeleteItem from "../Items/DeleteItem"
|
||||
import EditItem from "../Items/EditItem"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Flex, Image, useBreakpointValue } from "@chakra-ui/react"
|
||||
import { Link } from "@tanstack/react-router"
|
||||
|
||||
import Logo from "/assets/images/fastapi-logo.svg"
|
||||
import UserMenu from "./UserMenu"
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ import { Box, Flex, IconButton, Text } from "@chakra-ui/react"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
import { useState } from "react"
|
||||
import { FaBars } from "react-icons/fa"
|
||||
|
||||
import { FiLogOut } from "react-icons/fi"
|
||||
import type { UserPublic } from "../../client"
|
||||
import useAuth from "../../hooks/useAuth"
|
||||
|
||||
import type { UserPublic } from "@/client"
|
||||
import useAuth from "@/hooks/useAuth"
|
||||
import {
|
||||
DrawerBackdrop,
|
||||
DrawerBody,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Box, Flex, Icon, Text } from "@chakra-ui/react"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
import { Link as RouterLink } from "@tanstack/react-router"
|
||||
|
||||
import { FiBriefcase, FiHome, FiSettings, FiUsers } from "react-icons/fi"
|
||||
import type { IconType } from "react-icons/lib"
|
||||
import type { UserPublic } from "../../client"
|
||||
|
||||
import type { UserPublic } from "@/client"
|
||||
|
||||
const items = [
|
||||
{ icon: FiHome, title: "Dashboard", path: "/" },
|
||||
|
||||
@@ -2,7 +2,7 @@ import { IconButton } from "@chakra-ui/react"
|
||||
import { BsThreeDotsVertical } from "react-icons/bs"
|
||||
import { MenuContent, MenuRoot, MenuTrigger } from "../ui/menu"
|
||||
|
||||
import type { UserPublic } from "../../client"
|
||||
import type { UserPublic } from "@/client"
|
||||
import DeleteUser from "../Admin/DeleteUser"
|
||||
import EditUser from "../Admin/EditUser"
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Box, Button, Flex, Text } from "@chakra-ui/react"
|
||||
import { Link } from "@tanstack/react-router"
|
||||
import { FaUserAstronaut } from "react-icons/fa"
|
||||
|
||||
import { FiLogOut, FiUser } from "react-icons/fi"
|
||||
import useAuth from "../../hooks/useAuth"
|
||||
|
||||
import useAuth from "@/hooks/useAuth"
|
||||
import { MenuContent, MenuItem, MenuRoot, MenuTrigger } from "../ui/menu"
|
||||
|
||||
const UserMenu = () => {
|
||||
|
||||
@@ -11,10 +11,11 @@ import {
|
||||
} from "@chakra-ui/react"
|
||||
import { useState } from "react"
|
||||
import { FaPlus } from "react-icons/fa"
|
||||
import { type ItemCreate, ItemsService } from "../../client"
|
||||
import type { ApiError } from "../../client/core/ApiError"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { handleError } from "../../utils"
|
||||
|
||||
import { type ItemCreate, ItemsService } from "@/client"
|
||||
import type { ApiError } from "@/client/core/ApiError"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { handleError } from "@/utils"
|
||||
import {
|
||||
DialogBody,
|
||||
DialogCloseTrigger,
|
||||
|
||||
@@ -3,7 +3,8 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { FiTrash2 } from "react-icons/fi"
|
||||
import { ItemsService } from "../../client"
|
||||
|
||||
import { ItemsService } from "@/client"
|
||||
import {
|
||||
DialogActionTrigger,
|
||||
DialogBody,
|
||||
@@ -13,8 +14,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogRoot,
|
||||
DialogTrigger,
|
||||
} from "../../components/ui/dialog"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
} from "@/components/ui/dialog"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
|
||||
const DeleteItem = ({ id }: { id: string }) => {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
||||
@@ -10,9 +10,10 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { useState } from "react"
|
||||
import { type SubmitHandler, useForm } from "react-hook-form"
|
||||
import { FaExchangeAlt } from "react-icons/fa"
|
||||
import { type ApiError, type ItemPublic, ItemsService } from "../../client"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { handleError } from "../../utils"
|
||||
|
||||
import { type ApiError, type ItemPublic, ItemsService } from "@/client"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { handleError } from "@/utils"
|
||||
import {
|
||||
DialogBody,
|
||||
DialogCloseTrigger,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Container, Heading, Stack } from "@chakra-ui/react"
|
||||
import { useTheme } from "next-themes"
|
||||
import { Radio, RadioGroup } from "../../components/ui/radio"
|
||||
|
||||
import { Radio, RadioGroup } from "@/components/ui/radio"
|
||||
|
||||
const Appearance = () => {
|
||||
const { theme, setTheme } = useTheme()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Box, Button, Container, Heading, VStack } from "@chakra-ui/react"
|
||||
import { useMutation } from "@tanstack/react-query"
|
||||
import { type SubmitHandler, useForm } from "react-hook-form"
|
||||
|
||||
import { FiLock } from "react-icons/fi"
|
||||
import { type ApiError, type UpdatePassword, UsersService } from "../../client"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { confirmPasswordRules, handleError, passwordRules } from "../../utils"
|
||||
|
||||
import { type ApiError, type UpdatePassword, UsersService } from "@/client"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { confirmPasswordRules, handleError, passwordRules } from "@/utils"
|
||||
import { PasswordInput } from "../ui/password-input"
|
||||
|
||||
interface UpdatePasswordForm extends UpdatePassword {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { Button, ButtonGroup, Text } from "@chakra-ui/react"
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query"
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { type ApiError, UsersService } from "../../client"
|
||||
|
||||
import { type ApiError, UsersService } from "@/client"
|
||||
import {
|
||||
DialogActionTrigger,
|
||||
DialogBody,
|
||||
@@ -13,10 +14,10 @@ import {
|
||||
DialogRoot,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "../../components/ui/dialog"
|
||||
import useAuth from "../../hooks/useAuth"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { handleError } from "../../utils"
|
||||
} from "@/components/ui/dialog"
|
||||
import useAuth from "@/hooks/useAuth"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { handleError } from "@/utils"
|
||||
|
||||
const DeleteConfirmation = () => {
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
||||
@@ -16,10 +16,10 @@ import {
|
||||
type UserPublic,
|
||||
type UserUpdateMe,
|
||||
UsersService,
|
||||
} from "../../client"
|
||||
import useAuth from "../../hooks/useAuth"
|
||||
import useCustomToast from "../../hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "../../utils"
|
||||
} from "@/client"
|
||||
import useAuth from "@/hooks/useAuth"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { emailPattern, handleError } from "@/utils"
|
||||
import { Field } from "../ui/field"
|
||||
|
||||
const UserInformation = () => {
|
||||
|
||||
Reference in New Issue
Block a user