refactor: separation of shared components
This commit is contained in:
@ -7,7 +7,7 @@ import Board from "@/app/deals/components/Board/Board";
|
||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||
import { BoardSchema } from "@/lib/client";
|
||||
import { updateBoardMutation } from "@/lib/client/@tanstack/react-query.gen";
|
||||
import SortableDnd from "@/components/SortableDnd";
|
||||
import SortableDnd from "@/components/dnd/SortableDnd";
|
||||
import { notifications } from "@/lib/notifications";
|
||||
|
||||
const Boards = () => {
|
||||
|
||||
@ -2,7 +2,7 @@ import React, { FC, useMemo } from "react";
|
||||
import { Box } from "@mantine/core";
|
||||
import DealCard from "@/app/deals/components/DealCard/DealCard";
|
||||
import { DealSchema } from "@/lib/client";
|
||||
import { SortableItem } from "@/components/SortableDnd/SortableItem";
|
||||
import { SortableItem } from "@/components/dnd/SortableDnd/SortableItem";
|
||||
|
||||
type Props = {
|
||||
deal: DealSchema;
|
||||
|
||||
@ -11,7 +11,7 @@ import DndOverlay from "@/app/deals/components/DndOverlay/DndOverlay";
|
||||
import StatusColumn from "@/app/deals/components/StatusColumn/StatusColumn";
|
||||
import { useStatusesContext } from "@/app/deals/contexts/StatusesContext";
|
||||
import useDealsAndStatusesDnd from "@/app/deals/hooks/useDealsAndStatusesDnd";
|
||||
import { SortableItem } from "@/components/SortableDnd/SortableItem";
|
||||
import { SortableItem } from "@/components/dnd/SortableDnd/SortableItem";
|
||||
import useDndSensors from "../../hooks/useSensors";
|
||||
|
||||
type Props = {
|
||||
|
||||
@ -5,8 +5,8 @@ import StatusColumns from "@/app/deals/components/StatusColumns/StatusColumns";
|
||||
import { BoardsContextProvider } from "@/app/deals/contexts/BoardsContext";
|
||||
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
||||
import { StatusesContextProvider } from "@/app/deals/contexts/StatusesContext";
|
||||
import PageBlock from "@/components/PageBlock/PageBlock";
|
||||
import PageContainer from "@/components/PageContainer/PageContainer";
|
||||
import PageBlock from "@/components/layout/PageBlock/PageBlock";
|
||||
import PageContainer from "@/components/layout/PageContainer/PageContainer";
|
||||
|
||||
export default function DealsPage() {
|
||||
return (
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
import SortableDnd from "@/components/SortableDnd/SortableDnd";
|
||||
|
||||
export default SortableDnd;
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { CSSProperties, ReactNode, useContext } from "react";
|
||||
import SortableItemContext from "@/components/SortableDnd/SortableItemContext";
|
||||
import SortableItemContext from "@/components/dnd/SortableDnd/SortableItemContext";
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
@ -12,8 +12,8 @@ import { SortableContext } from "@dnd-kit/sortable";
|
||||
import { LexoRank } from "lexorank";
|
||||
import { Box, Group } from "@mantine/core";
|
||||
import useDndSensors from "@/app/deals/hooks/useSensors";
|
||||
import { SortableItem } from "@/components/SortableDnd/SortableItem";
|
||||
import { SortableOverlay } from "@/components/SortableDnd/SortableOverlay";
|
||||
import { SortableItem } from "@/components/dnd/SortableDnd/SortableItem";
|
||||
import { SortableOverlay } from "@/components/dnd/SortableDnd/SortableOverlay";
|
||||
import { getNewLexorank, sortByLexorank } from "@/utils/lexorank";
|
||||
|
||||
type BaseItem = {
|
||||
@ -1,7 +1,7 @@
|
||||
import React, { CSSProperties, PropsWithChildren, useMemo } from "react";
|
||||
import { useSortable } from "@dnd-kit/sortable";
|
||||
import { CSS } from "@dnd-kit/utilities";
|
||||
import DragHandle from "@/components/SortableDnd/DragHandle";
|
||||
import DragHandle from "@/components/dnd/SortableDnd/DragHandle";
|
||||
import SortableItemContext from "./SortableItemContext";
|
||||
|
||||
type Props = {
|
||||
3
src/components/dnd/SortableDnd/index.ts
Normal file
3
src/components/dnd/SortableDnd/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import SortableDnd from "@/components/dnd/SortableDnd/SortableDnd";
|
||||
|
||||
export default SortableDnd;
|
||||
Reference in New Issue
Block a user