Changeset 08f82ec for jobvista-frontend/src/views/dashboard
- Timestamp:
- 06/20/24 11:57:13 (5 months ago)
- Branches:
- main
- Children:
- 0f0add0
- Parents:
- befb988
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/views/dashboard/Dashboard.js
rbefb988 r08f82ec 34 34 35 35 36 37 // const [user, setUser] = useState(null);38 //39 // useEffect(() => {40 // const token = localStorage.getItem(AUTH_TOKEN);41 // if (token!=null) {42 // try {43 // const decodedToken = jwtDecode(token);44 // setUser({45 // name: decodedToken.name,46 // role: decodedToken.role,47 // hasAccess: decodedToken.access,48 // });49 // } catch (error) {50 // console.error('Failed to decode token', error);51 // }52 // }53 // console.log(user)54 // }, [auth]);55 56 // useEffect(() => {57 // if (auth) {58 // setRole(auth.role);59 // }60 // console.log(props)61 // }, [auth]);62 63 36 useEffect(() => { 64 37 if (!jobDispatched && jobAdvertisementsState.length == 0) { … … 72 45 73 46 } else { 74 setJobAdvertisements( jobAdvertisementsState)47 setJobAdvertisements(sortElementsBy(jobAdvertisementsState, "postedOn")) 75 48 console.log("Fetch all job advertisements STATE") 76 49 … … 160 133 jobAdvertisements.map((jobAd, index) => ( 161 134 <div key={index} className="col"> 162 <div className="custom-card ">135 <div className="custom-card dashboard-card"> 163 136 <div className="card-head"> 164 137 <span className="hourly-salary"><b>${jobAd.startingSalary}/hr</b></span> … … 187 160 </div> 188 161 189 <div className="aligned"> 190 <Link to={`/job-advertisements/${jobAd.id}`} className="card-button">Read 191 more</Link> 192 </div> 193 162 </div> 163 <div className="card-foot"> 164 <Link to={`/job-advertisements/${jobAd.id}`} className="card-button">Read 165 more</Link> 194 166 </div> 195 167 </div>
Note:
See TracChangeset
for help on using the changeset viewer.