-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathResources.js
More file actions
29 lines (26 loc) · 856 Bytes
/
Resources.js
File metadata and controls
29 lines (26 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react';
import '../../assets/css/App.css';
import './Resources.css';
import ResourcesList from '../data/data.json';
import { Link } from "react-router-dom";
import Toggle from "../Toggle";
import Disclaimer from "../Disclaimer/Disclaimer";
export default function Resources() {
return (
<div className="container">
<Toggle />
<div className="grid">
{
ResourcesList.map(resource =>
<article key={resource.id}>
<h1 data-testid="name">{resource.name}</h1>
<p data-testid="body" className="text">{resource.body}
</p>
<Link data-testid="link" className="resourceLink" to={`/resources/${resource.id}`}><span>More info</span></Link>
</article>)
}
</div>
<Disclaimer />
</div>
);
}