index.js
1 import React from 'react'; 2 import getConfig from 'next/config'; 3 import WordCloud from '../wordCloud'; 4 import Data from '../../data/resources/wordclouds'; 5 import './style.scss'; 6 7 const { publicRuntimeConfig } = getConfig(); 8 9 const Resources = () => ( 10 <div className="resources-wrap" id="resources"> 11 <div className="container"> 12 <h2 className="main-heading" style={{ backgroundImage: `url(${publicRuntimeConfig.subDirPath}/static/img/heading-textured-bg.jpg)` }}> 13 Resources 14 </h2> 15 <div className="wordclouds-wrap"> 16 { 17 Data.map((wordCloud, index) => 18 (<WordCloud 19 index={index} 20 key={wordCloud.title} 21 words={wordCloud} 22 />)) 23 } 24 </div> 25 </div> 26 </div> 27 ); 28 29 export default Resources;