Skip to content

Commit

Permalink
linting issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpumzee committed Apr 13, 2024
1 parent 1270d85 commit 719283f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 14 deletions.
1 change: 1 addition & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<!-- <link rel="icon" type="image" href="/frontend/src/assets/cc2.jpeg" /> -->
<link rel="shortcut icon" href="/src/assets/cc3.jpeg" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ChitChat</title>
</head>
Expand Down
67 changes: 53 additions & 14 deletions frontend/src/pages/UsersList.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,61 @@
import React, { useEffect, useState } from "react";
import React from "react";

function UsersList() {
const [users, setUsers] = useState([]);
// const [users, setUsers] = useState([]);

useEffect(() => {
fetch("http://127.0.0.1:9000/api/profiles/")
.then((response) => response.json())
.then((data) => setUsers(data));
}, []);
// useEffect(() => {
// fetch("http://127.0.0.1:9000/api/profiles/")
// .then((response) => response.json())
// .then((data) => setUsers(data));
// }, []);

return (
<div>
<h1>Users</h1>
<ul>
{users.map((user) => (
<li key={user.id}>{user.user}</li>
))}
</ul>
<div className="bg-red-500 p-2">
<div className="container mx-auto">
<div className="flex justify-between items-center">
<div className="text-white font-bold text-xl">W</div>
<nav>
<ul className="flex space-x-4">
<li>
<i className="fa-solid fa-house text-white"></i>
<a href="#" className="text-white hover:text-gray-300">
Home
</a>
</li>
<li>
<a href="#" className="text-white hover:text-gray-300">
Companies
</a>
</li>
<li>
<a href="#" className="text-white hover:text-gray-300">
Profiles
</a>
</li>
<li>
<a href="#" className="text-white hover:text-gray-300">
Jobs
</a>
</li>
<li>
<a href="#" className="text-white hover:text-gray-300">
Messages
</a>
</li>
<li>
<button
type="button"
className="bg-green-500 text-white px-2 py-1 rounded-md hover:bg-green-600 focus:outline-none focus:ring focus:border-blue-300"
>
Notification
</button>
</li>
</ul>
</nav>

<div className="">John Doe</div>
</div>
</div>
</div>
);
}
Expand Down

0 comments on commit 719283f

Please sign in to comment.