Skip to content

Commit

Permalink
Merge branch 'main' into magazine
Browse files Browse the repository at this point in the history
  • Loading branch information
panwar8279 authored Aug 10, 2024
2 parents 8d11f00 + ff51a17 commit efd160b
Show file tree
Hide file tree
Showing 12 changed files with 681 additions and 760 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/check_duplicate_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:

- name: Check for duplicate entries in product.json
run: |
# Check for duplicate entries in product.json
jq -r '.[].productName' product.json | sort | uniq -d > duplicates.txt
# Check for duplicate entries based on the 'link' field in product.json
jq -r '.[].link' product.json | sort | uniq -d > duplicates.txt
if [ -s duplicates.txt ]; then
echo "Duplicate entries found in product.json:"
echo "Duplicate entries found in product.json based on 'link':"
cat duplicates.txt
exit 1
else
echo "No duplicate entries found."
echo "No duplicate entries found based on 'link'."
fi
close-issues:
Expand All @@ -46,4 +46,4 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE \
-d '{"state":"closed"}'
done
done
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<a id="top"></a>
<div align="center">
<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>
<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>
Expand Down Expand Up @@ -212,7 +213,9 @@ If you would like to contribute to the project then kindly go through [Contribut
<h2>Let's Collaborate and Make DevLabs Even Better! 💻🌟</h2>
</div>

### ✨ Features
<details>
<summary><h2>✨ Features</h2></summary>


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

</details>

### 🌍 Community

### 🏆 Contributors
<hr>

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

```bash
npx all-contributors-cli add <username> <contribution>
```
<a href="https://github.com/HimanshuNarware/Devlabs/graphs/contributors">
<img src="https://contrib.rocks/image?repo=HimanshuNarware/Devlabs" />
</a>

</div>

<hr>
<div>
<h2><img src="https://fonts.gstatic.com/s/e/notoemoji/latest/1f64f_1f3fb/512.webp" width="35" height="35"> Support </h2>
</div>

<div>
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!
</div> <br>

<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>
`
2 changes: 1 addition & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import ChatAssistant from "./ChatAssistant/ChatAssistant";
const About = lazy(() => import("./Component/About"));
const Rateus = lazy(() => import("./Component/Rateus"));
const Home = lazy(() => import("./Component/Home"));
// const NotFound = lazy(() => import("./Component/NotFound"));
const NotFound = lazy(() => import("./Component/NotFound"));
const OpenSource = lazy(() => import("./Component/OpenSource"));
const Review = lazy(() => import("./Component/Review"));
const BookMark = lazy(() => import("./Component/BookMark"));
Expand Down
32 changes: 20 additions & 12 deletions frontend/src/Component/BookMark.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
import { deleteSource } from "../Slice/DataSlice";
import bookmarkAnimation from "../lottie/bookmark.json";
Expand All @@ -7,19 +7,18 @@ import Lottie from "lottie-react";
import toast from "react-hot-toast";

function BookMark() {
const sourceData = useSelector((state) => state.SourceReducer.sourceData);
const sourceData = useSelector((state) => state.SourceReducer.sourceData); // Adjust the selector to match your state structure
const dispatch = useDispatch();
const [currentPage, setCurrentPage] = useState(1);
const [postPerPage] = useState(8); // Number of bookmarks per page

useEffect(() => {
localStorage.setItem("bookmarks", JSON.stringify(sourceData));
}, [sourceData]);

const handleDeleteBookmark = (name) => {
console.log("remove", name);
dispatch(deleteSource({ name }));

const bookmarksInStorage =
JSON.parse(localStorage.getItem("bookmarks")) || [];
const updatedBookmarks = bookmarksInStorage.filter(
(bookmark) => bookmark.name !== name
);
localStorage.setItem("bookmarks", JSON.stringify(updatedBookmarks));
toast.success("Bookmark removed successfully");
};

Expand All @@ -39,10 +38,17 @@ function BookMark() {
{currentBookmarks?.length > 0 ? (
currentBookmarks?.map((data, index) => (
<div className="bookmark__box" key={index}>
<img className="bookmark__logo" src={data.image} alt={data.name} />
<img
className="bookmark__logo"
src={data.image}
alt={data.name}
/>
<h2>{data.name}</h2>
<p className="bookmark__box-text">{data.desc}</p>
<button className="bookmark__button" onClick={() => window.open(data.link)}>
<button
className="bookmark__button"
onClick={() => window.open(data.link)}
>
Link
</button>
<button
Expand Down Expand Up @@ -103,7 +109,9 @@ function BookMark() {
style={{ height: "200px" }}
/>
<h1 className="text-2xl font-semibold">No bookmark Found</h1>
<h3 className="mb-4">Explore Devlabs and add them to your bookmark</h3>
<h3 className="mb-4">
Explore Devlabs and add them to your bookmark
</h3>
</div>
)}
</div>
Expand Down
Loading

0 comments on commit efd160b

Please sign in to comment.