11import React , { useEffect , useState } from "react" ;
2- import Groups from "../components/Groups/Groups" ;
3- import Messaging from "../components/Groups/Messaging/Messaging" ;
2+ import data from "../components/groups/data/data.json" ;
3+ import Groups from "../components/groups/Groups" ;
4+ import Messaging from "../components/groups/Messaging/Messaging" ;
5+ import PiggyBank from "../components/groups/PiggyBank" ;
6+ import Wishlist from "../components/groups/Wishlist" ;
47import Button from "../components/utils/Button" ;
58import type { GetAllMyGroupsQuery } from "../generated/graphql-types" ;
69import { useGetAllMyGroupsQuery } from "../generated/graphql-types" ;
@@ -10,10 +13,14 @@ export default function Conversations() {
1013 const [ _whislist , setWishlist ] = React . useState ( true ) ;
1114
1215 const { data : groupData } = useGetAllMyGroupsQuery ( ) ;
13- const [ groups , setGroups ] = useState < GetAllMyGroupsQuery [ "getAllMyGroups" ] > ( [ ] ) ;
16+ const [ groups , setGroups ] = useState < GetAllMyGroupsQuery [ "getAllMyGroups" ] > (
17+ [ ]
18+ ) ;
1419
1520 const [ activeGroupId , setActiveGroupId ] = React . useState < Number | null > ( null ) ;
16- const [ activeGroup , setActiveGroup ] = React . useState < GetAllMyGroupsQuery [ "getAllMyGroups" ] [ 0 ] | null > ( null ) ;
21+ const [ activeGroup , setActiveGroup ] = React . useState <
22+ GetAllMyGroupsQuery [ "getAllMyGroups" ] [ 0 ] | null
23+ > ( null ) ;
1724
1825 useEffect ( ( ) => {
1926 setGroups ( groupData ?. getAllMyGroups || [ ] ) ;
@@ -34,7 +41,9 @@ export default function Conversations() {
3441 { /* Left Column */ }
3542 < div className = "flex flex-col mx-[2vw] h-full min-h-0 justify-between" >
3643 < div className = "h-[calc(50%-2rem)] flex pb-2 " >
37- { groups && < Groups groups = { groups } setActiveGroup = { setActiveGroupId } /> }
44+ { groups && (
45+ < Groups groups = { groups } setActiveGroup = { setActiveGroupId } />
46+ ) }
3847 </ div >
3948
4049 < div className = "flex flex-row gap-2 pb-2 absolute top-[calc(50%)]" >
0 commit comments