-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01cf73d
commit 00313a4
Showing
33 changed files
with
690 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1 @@ | ||
[ | ||
{ | ||
"title": "Unlocking Creativity: A Guide to Overcoming Creative Blocks", | ||
"author": "Jane Doe", | ||
"banner": "image1.jpg", | ||
"date": "February 15, 2023", | ||
"description": "In this insightful post, Jane Doe explores practical tips and strategies to overcome creative blocks and unleash your full creative potential." | ||
}, | ||
{ | ||
"title": "The Impact of Technology on Education: Navigating the Digital Frontier", | ||
"author": "John Smith", | ||
"banner": "image2.jpg", | ||
"date": "March 8, 2023", | ||
"description": "John Smith delves into the transformative role of technology in education, discussing its implications on teaching methods, student engagement, and the future of learning." | ||
}, | ||
{ | ||
"title": "Mindfulness in the Workplace: Fostering Well-being for Increased Productivity", | ||
"author": "Sarah Johnson", | ||
"banner": "image3.jpg", | ||
"date": "April 20, 2023", | ||
"description": "Sarah Johnson shares her insights on incorporating mindfulness practices into the workplace, exploring the benefits for both employees and organizations in achieving a healthier and more productive work environment." | ||
} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
/* eslint-disable react-hooks/exhaustive-deps */ | ||
import axios from "axios"; | ||
import React, { useEffect, useState } from "react"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export default function useFetchSingelUserWithCourse(id,role) { | ||
const [loading,setloading] = useState(true); | ||
const [userwithCourse, setuserwithCourse] = useState(); | ||
useEffect(() => { | ||
const fetchUseWithCourse = async () => { | ||
try { | ||
setloading(true) | ||
const snapshort = await axios.get( | ||
`${import.meta.env.VITE_API_URL}/user/singel/${id}?role=${role}`, | ||
{ withCredentials: true } | ||
); | ||
setuserwithCourse(snapshort.data); | ||
|
||
setloading(false) | ||
} catch (err) { | ||
console.log(err); | ||
setloading(false) | ||
} | ||
}; | ||
fetchUseWithCourse() | ||
}, []); | ||
return {userwithCourse} | ||
return {userwithCourse , loading} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
import axios from "axios"; | ||
import React, { useState } from "react"; | ||
import { useState } from "react"; | ||
|
||
export default function useGetAllFollow() { | ||
const[loading,setloading] = useState(true) | ||
const [Follows, setFollow] = useState(); | ||
const fetchFollow = async (page, limit) => { | ||
try { | ||
setloading(true); | ||
const snapshort = await axios.get( | ||
`${import.meta.env.VITE_API_URL}/user/follows?${ | ||
page ? "page=" + page + "&" : "" | ||
}${limit ? "limit=" + limit : ""}`, | ||
{ withCredentials: true } | ||
); | ||
setFollow(snapshort.data.data); | ||
setloading(false); | ||
} catch (err) { | ||
setloading(false); | ||
console.log(err); | ||
} | ||
}; | ||
return { Follows, fetchFollow }; | ||
|
||
return { Follows, fetchFollow,loading }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
export default function Blogs() { | ||
const data = [ | ||
{ | ||
title: "Unlocking Creativity: A Guide to Overcoming Creative Blocks", | ||
author: "Jane Doe", | ||
banner: "https://i.ibb.co/XkqVpKX/1682708266984.jpg", | ||
date: "February 15, 2023", | ||
description: | ||
"In this insightful post, Jane Doe explores practical tips and strategies to overcome creative blocks and unleash your full creative potential.", | ||
}, | ||
{ | ||
title: | ||
"The Impact of Technology on Education: Navigating the Digital Frontier", | ||
author: "John Smith", | ||
banner: "https://i.ibb.co/WVRBfYB/1694618553933.jpg", | ||
date: "March 8, 2023", | ||
description: | ||
"John Smith delves into the transformative role of technology in education, discussing its implications on teaching methods, student engagement, and the future of learning.", | ||
}, | ||
{ | ||
title: | ||
"Mindfulness in the Workplace: Fostering Well-being for Increased Productivity", | ||
author: "Sarah Johnson", | ||
banner: "https://i.ibb.co/vcGZbVd/mediation-importance-1.png", | ||
date: "April 20, 2023", | ||
description: | ||
"Sarah Johnson shares her insights on incorporating mindfulness practices into the workplace, exploring the benefits for both employees and organizations in achieving a healthier and more productive work environment.", | ||
}, | ||
]; | ||
return ( | ||
<div className="container mx-auto mt-16 mb-32"> | ||
<div className=" capitalize container mx-auto text-center mb-20 space-y-4"> | ||
<h3 className="text-xl text-sky-500"> | ||
Explore the Best in Tech, Today. | ||
</h3> | ||
<h1 className="text-5xl mb-5 font-bold">Our Tech Odyssey</h1> | ||
</div> | ||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-14"> | ||
{data.map((ele, ind) => { | ||
return ( | ||
<div key={ind} className="card rounded-md bg-base-100 shadow-xl"> | ||
<figure> | ||
<img className=" h-60 w-full object-cover" src={ele.banner} alt="Shoes" /> | ||
</figure> | ||
<div className="card-body"> | ||
<div className="time mb-4 flex justify-between items-center"> | ||
<span>{ele.date}</span> | ||
<span className="opacity-75 flex gap-2"><i className="fa-solid text-sm fa-user-tie"></i> <span>{ele.author}</span></span> | ||
</div> | ||
<h2 className="card-title">{ele.title.slice(0,50)+".."}</h2> | ||
<p className="text-base">{ele.description.slice(0,100)+".."}</p> | ||
<div className="card-actions mt-5 justify-end"> | ||
<button className="btn btn-info text-white rounded-none">Read more </button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.