implement temporary ui and api routes to fix
Change-Id: Idb07d146f11d2f11f3ad2323a5c18fc125a91e73
diff --git a/client/src/components/ContactList.js b/client/src/components/ContactList.js
index 2020a6e..73950a2 100644
--- a/client/src/components/ContactList.js
+++ b/client/src/components/ContactList.js
@@ -1,12 +1,35 @@
-import List from '@mui/material/List'
-import React from 'react'
+import List from "@mui/material/List";
+import authManager from "../AuthManager";
+import React, { useState, useEffect } from "react";
+import { useAppDispatch, useAppSelector } from "../../redux/hooks";
+
export default function ContactList() {
- return (
- <div className="rooms-list">
- <List>
+ const { accountId } = useAppSelector((state) => state.app);
+ const dispatch = useAppDispatch();
- </List>
- </div>
- )
+ const [contacts, setContacts] = useState([]);
+
+ useEffect(() => {
+ const controller = new AbortController();
+ authManager
+ .fetch(`/api/accounts/${accountId}/contacts/`, {
+ method: "GET",
+ header: { "Content-Type": "application/json" },
+ // signal: controller.signal,
+ })
+ .then((res) => {
+ res.json();
+ })
+ .then((result) => {
+ console.log(result);
+ });
+ return () => controller.abort();
+ }, []);
+
+ return (
+ <div className="rooms-list">
+ <List></List>
+ </div>
+ );
}