Skip to content

Commit

Permalink
Dynamic coures-Content
Browse files Browse the repository at this point in the history
  • Loading branch information
raihanuldev committed Nov 21, 2023
1 parent bc4d427 commit cf41d7b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Dashbord/coures-content/CouresContent.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React, { useEffect, useState } from 'react';
import './content.css';
import MilestoneInfo from './milestoneInfo/MilestoneInfo';
import { useLocation } from 'react-router-dom';

const CouresContent = () => {
const location = useLocation();
const couresInfo = location.state?.item;
// Fake Data for coures Content..
const [data, setData] = useState([]);
console.log(data);
// console.log(data);


useEffect(() => {
fetch('/data.json')
Expand All @@ -14,12 +19,13 @@ const CouresContent = () => {

return (
<div className="main h-screen bg-black text-white">

{/* <!-- course details start --> */}
<div className="milestoneDetails">
<img className="milestoneImage" src="/kv.png" alt="" />
<img className="milestoneImage" src={couresInfo.image} alt="" />

<h1 className="title text-2xl">Testing Module Sir</h1>
<p className="details">This is about COuresContent </p>
<h1 className="title text-2xl">{couresInfo.name || "Testing"}</h1>
<p className="details">{couresInfo.details} </p>
</div>
{/* <!-- course details end --> */}

Expand Down

0 comments on commit cf41d7b

Please sign in to comment.