Skip to content

Commit 9bd1081

Browse files
Merge branch 'main' into tepelt
2 parents a45e25f + 511eb3e commit 9bd1081

File tree

11 files changed

+642
-485
lines changed

11 files changed

+642
-485
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<a id="top"></a>
12
<div align="center">
23
<h1><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Laptop.png" alt="Laptop" width="50" height="50" /> DevLabs</h1>
34
<p>Welcome to DevLabs, a website where you can search for free tools that are useful for your daily needs. This application is created by the incredible open-source community. On DevLabs, you can discover a collection of free tools that can assist you in various aspects of your life. Moreover, you have the opportunity to contribute to this project by adding more tools to the database.</p>
@@ -212,7 +213,9 @@ If you would like to contribute to the project then kindly go through [Contribut
212213
<h2>Let's Collaborate and Make DevLabs Even Better! 💻🌟</h2>
213214
</div>
214215

215-
### ✨ Features
216+
<details>
217+
<summary><h2>✨ Features</h2></summary>
218+
216219

217220
1. User Authentication:
218221
Secure user registration and login using JWT.
@@ -255,12 +258,30 @@ If you would like to contribute to the project then kindly go through [Contribut
255258
### 📚 Learn
256259
To know more about project, please go through [Learn](learn.md)
257260

261+
</details>
262+
258263
### 🌍 Community
259264

260-
### 🏆 Contributors
265+
<hr>
261266

262-
Recognize the individuals who have contributed to the project. You can use tools like All Contributors to automatically generate a list of contributors.
267+
<h2 align = "center">Our Contributors ❤️</h2>
268+
<div align = "center">
269+
<h3>Thank you for contributing to our repository</h3>
263270

264-
```bash
265-
npx all-contributors-cli add <username> <contribution>
266-
```
271+
<a href="https://github.com/HimanshuNarware/Devlabs/graphs/contributors">
272+
<img src="https://contrib.rocks/image?repo=HimanshuNarware/Devlabs" />
273+
</a>
274+
275+
</div>
276+
277+
<hr>
278+
<div>
279+
<h2><img src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f64f_1f3fb/512.webp" width="35" height="35"> Support </h2>
280+
</div>
281+
282+
<div>
283+
Don't forget to leave a star<img src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f31f/512.webp" width="35" height="30"> for this project!
284+
</div> <br>
285+
286+
<a href="#top" style="position: fixed; bottom: 20px; right: 20px; background-color: black ; color: white; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; border-radius: 5px; font-family: Arial; font-size: 16px;">Go to Top</a>
287+
`

frontend/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import ChatAssistant from "./ChatAssistant/ChatAssistant";
1616
const About = lazy(() => import("./Component/About"));
1717
const Rateus = lazy(() => import("./Component/Rateus"));
1818
const Home = lazy(() => import("./Component/Home"));
19-
// const NotFound = lazy(() => import("./Component/NotFound"));
19+
const NotFound = lazy(() => import("./Component/NotFound"));
2020
const OpenSource = lazy(() => import("./Component/OpenSource"));
2121
const Review = lazy(() => import("./Component/Review"));
2222
const BookMark = lazy(() => import("./Component/BookMark"));

frontend/src/Component/BookMark.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React, { useState, useEffect } from "react";
22
import { useSelector, useDispatch } from "react-redux";
33
import { deleteSource } from "../Slice/DataSlice";
44
import bookmarkAnimation from "../lottie/bookmark.json";
@@ -7,19 +7,18 @@ import Lottie from "lottie-react";
77
import toast from "react-hot-toast";
88

99
function BookMark() {
10-
const sourceData = useSelector((state) => state.SourceReducer.sourceData);
10+
const sourceData = useSelector((state) => state.SourceReducer.sourceData); // Adjust the selector to match your state structure
1111
const dispatch = useDispatch();
1212
const [currentPage, setCurrentPage] = useState(1);
1313
const [postPerPage] = useState(8); // Number of bookmarks per page
14+
15+
useEffect(() => {
16+
localStorage.setItem("bookmarks", JSON.stringify(sourceData));
17+
}, [sourceData]);
18+
1419
const handleDeleteBookmark = (name) => {
20+
console.log("remove", name);
1521
dispatch(deleteSource({ name }));
16-
17-
const bookmarksInStorage =
18-
JSON.parse(localStorage.getItem("bookmarks")) || [];
19-
const updatedBookmarks = bookmarksInStorage.filter(
20-
(bookmark) => bookmark.name !== name
21-
);
22-
localStorage.setItem("bookmarks", JSON.stringify(updatedBookmarks));
2322
toast.success("Bookmark removed successfully");
2423
};
2524

@@ -39,10 +38,17 @@ function BookMark() {
3938
{currentBookmarks?.length > 0 ? (
4039
currentBookmarks?.map((data, index) => (
4140
<div className="bookmark__box" key={index}>
42-
<img className="bookmark__logo" src={data.image} alt={data.name} />
41+
<img
42+
className="bookmark__logo"
43+
src={data.image}
44+
alt={data.name}
45+
/>
4346
<h2>{data.name}</h2>
4447
<p className="bookmark__box-text">{data.desc}</p>
45-
<button className="bookmark__button" onClick={() => window.open(data.link)}>
48+
<button
49+
className="bookmark__button"
50+
onClick={() => window.open(data.link)}
51+
>
4652
Link
4753
</button>
4854
<button
@@ -103,7 +109,9 @@ function BookMark() {
103109
style={{ height: "200px" }}
104110
/>
105111
<h1 className="text-2xl font-semibold">No bookmark Found</h1>
106-
<h3 className="mb-4">Explore Devlabs and add them to your bookmark</h3>
112+
<h3 className="mb-4">
113+
Explore Devlabs and add them to your bookmark
114+
</h3>
107115
</div>
108116
)}
109117
</div>

0 commit comments

Comments
 (0)