|  | 
| 1 |  | -import React from "react"; | 
|  | 1 | +import React, { useState, useRef } from 'react'; | 
| 2 | 2 | import "./resources.css"; | 
|  | 3 | +import Tutorials from './Tutorials.js'; | 
|  | 4 | +import Research from './Research'; | 
|  | 5 | +import Organizations from './Organizations'; | 
| 3 | 6 | 
 | 
| 4 |  | -export default function Resources() { | 
|  | 7 | +/* | 
|  | 8 | +Create card tab Tutorials | Research | Organizations both underline + hover highlight box | 
|  | 9 | +v-Link tab to component -> how to link subpage | 
|  | 10 | +Use Hook to change card tab | 
|  | 11 | +Create Tutorials, Research, and Organizations Container | 
|  | 12 | +Container: | 
|  | 13 | +
 | 
|  | 14 | +Square box: Dat center large font 46px, Time below | 
|  | 15 | +Click view detail, box will expand | 
|  | 16 | +
 | 
|  | 17 | +Line break | 
|  | 18 | +
 | 
|  | 19 | +Container includes: | 
|  | 20 | +	Shadow: Hover expand | 
|  | 21 | +	Card: Title, Url, Description | 
|  | 22 | +*/ | 
|  | 23 | + | 
|  | 24 | +const Resources = () => { | 
| 5 | 25 |   return ( | 
| 6 | 26 |     <div className="resources-container"> | 
| 7 |  | -      <div className="resources-wrapper"> | 
| 8 |  | -        <div className="resources-info"> | 
| 9 |  | -          <div className="resources-title">Scholarships & Programs</div> | 
| 10 |  | -          <div className="resources-desc"> | 
| 11 |  | -            <span>Scholarships:</span> | 
| 12 |  | -            <ul className="resources-list"> | 
| 13 |  | -              <li>Our scholarship application period is currently closed.</li> | 
| 14 |  | -            </ul> | 
| 15 |  | -            <span>Programs:</span> | 
| 16 |  | -            <ul className="resources-list"> | 
| 17 |  | -              <li>Early Research Scholars Programs.</li> | 
| 18 |  | -            </ul> | 
| 19 |  | -          </div> | 
|  | 27 | +      <h1 className="resource-title">Resources</h1> | 
|  | 28 | +      <Tab className="tab-components"/> | 
|  | 29 | +    </div> | 
|  | 30 | +  ); | 
|  | 31 | +}; | 
|  | 32 | + | 
|  | 33 | +export default Resources; | 
|  | 34 | + | 
|  | 35 | +function Tab() { | 
|  | 36 | +  const [tabState, setTab] = useState(1) | 
|  | 37 | + | 
|  | 38 | +  const toggleTab = (index) => { | 
|  | 39 | +    setTab(index) | 
|  | 40 | +  } | 
|  | 41 | + | 
|  | 42 | +  return ( | 
|  | 43 | +    <div className='tab-container'> | 
|  | 44 | +      {/* | 
|  | 45 | +        <Link to='/resources/tutorials' className='tab-button'>Tutorials</Link> | 
|  | 46 | +        <Link to='resources/research' className='tab-button'>Research</Link> | 
|  | 47 | +        <Link to='resources/organizations' className='tab-button'>Organizations</Link> | 
|  | 48 | +      */} | 
|  | 49 | +      <div className='tabs'> | 
|  | 50 | +        <button type='button' onClick={() => toggleTab(1)} className={tabState === 1 ? 'tab-button active' : 'tab-button'}>Tutorials</button> | 
|  | 51 | +        <button type='button' onClick={() => toggleTab(2)} className={tabState === 2 ? 'tab-button active' : 'tab-button'}>Research</button> | 
|  | 52 | +        <button type='button' onClick={() => toggleTab(3)} className={tabState === 3 ? 'tab-button active' : 'tab-button'}>Organizations</button> | 
|  | 53 | +      </div> | 
|  | 54 | + | 
|  | 55 | +      <div className="tab-contents"> | 
|  | 56 | +        <div className={tabState === 1 ? 'tab-content active-content': 'tab-content'}> | 
|  | 57 | +          <h2>Tutorials</h2> | 
|  | 58 | +          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, | 
|  | 59 | +							sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | 
|  | 60 | +							Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris | 
|  | 61 | +							nisi ut aliquip ex ea commodo consequat. | 
|  | 62 | +          </p> | 
| 20 | 63 |         </div> | 
| 21 |  | -        <div className="resources-info"> | 
| 22 |  | -          <div className="resources-title">Must Reads</div> | 
| 23 |  | -          <div className="resources-desc"> | 
| 24 |  | -            <span>Scholarships:</span> | 
| 25 |  | -            <ul className="resources-list"> | 
| 26 |  | -              <li>Our scholarship application period is currently closed.</li> | 
| 27 |  | -            </ul> | 
| 28 |  | -            <span>Programs:</span> | 
| 29 |  | -            <ul className="resources-list"> | 
| 30 |  | -              <li>Early Research Scholars Programs.</li> | 
| 31 |  | -            </ul> | 
| 32 |  | -          </div> | 
|  | 64 | + | 
|  | 65 | +        <div  className={tabState === 2 ? 'tab-content active-content': 'tab-content'}> | 
|  | 66 | +          <h2>Research</h2> | 
|  | 67 | +          <p>Something about Early Research Scholars Programs. | 
|  | 68 | +          </p> | 
| 33 | 69 |         </div> | 
| 34 |  | -        <div className="resources-info"> | 
| 35 |  | -          <div className="resources-title">Similar Orgs</div> | 
| 36 |  | -          <div className="resources-desc"> | 
| 37 |  | -            <span>Scholarships:</span> | 
| 38 |  | -            <ul className="resources-list"> | 
| 39 |  | -              <li>Our scholarship application period is currently closed.</li> | 
| 40 |  | -            </ul> | 
| 41 |  | -            <span>Programs:</span> | 
| 42 |  | -            <ul className="resources-list"> | 
| 43 |  | -              <li>Early Research Scholars Programs.</li> | 
| 44 |  | -            </ul> | 
| 45 |  | -          </div> | 
|  | 70 | + | 
|  | 71 | +        <div  className={tabState === 3 ? 'tab-content active-content': 'tab-content'}> | 
|  | 72 | +          <h2>Organizations</h2> | 
|  | 73 | +          <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, | 
|  | 74 | +							sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | 
|  | 75 | +							Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris | 
|  | 76 | +							nisi ut aliquip ex ea commodo consequat. | 
|  | 77 | +          </p> | 
| 46 | 78 |         </div> | 
| 47 | 79 |       </div> | 
| 48 | 80 |     </div> | 
| 49 |  | -  ); | 
|  | 81 | +  ) | 
| 50 | 82 | } | 
0 commit comments