feat: raw deals dnd between statuses
This commit is contained in:
37
src/app/deals/hooks/useDeals.ts
Normal file
37
src/app/deals/hooks/useDeals.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { DealSchema } from "@/types/DealSchema";
|
||||
|
||||
const useDeals = () => {
|
||||
const [deals, setDeals] = useState<DealSchema[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
const INITIAL_DEALS: DealSchema[] = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Deal 1",
|
||||
rank: "0|gggggg:",
|
||||
statusId: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Deal 2",
|
||||
rank: "0|mmmmmm:",
|
||||
statusId: 1,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Deal 3",
|
||||
rank: "0|ssssss:",
|
||||
statusId: 2,
|
||||
},
|
||||
];
|
||||
setDeals(INITIAL_DEALS);
|
||||
}, []);
|
||||
|
||||
return {
|
||||
deals,
|
||||
setDeals,
|
||||
};
|
||||
};
|
||||
|
||||
export default useDeals;
|
||||
Reference in New Issue
Block a user