- implementing hobby, language and reference sections

- dynamic template selection
This commit is contained in:
Amruth Pillai
2020-07-09 10:41:16 +05:30
parent 9045e2983d
commit 9e98da038c
38 changed files with 470 additions and 187 deletions

View File

@ -16,7 +16,7 @@ const LeftNavbar = () => (
<div className="grid grid-cols-1 gap-8">
{sections.map((x) => (
<SectionIcon key={x.id} section={x} />
<SectionIcon key={x.id} section={x} containerId="LeftSidebar" />
))}
</div>

View File

@ -1,4 +1,5 @@
import React, { Fragment } from 'react';
import React from 'react';
import { Element } from 'react-scroll';
import sections from '../../../data/leftSections';
import LeftNavbar from './LeftNavbar';
import styles from './LeftSidebar.module.css';
@ -7,12 +8,12 @@ const LeftSidebar = () => (
<div className="flex">
<LeftNavbar />
<div className={styles.container}>
<div id="LeftSidebar" className={styles.container}>
{sections.map(({ id, name, event, component: Component }) => (
<Fragment key={id}>
<Element key={id} name={id}>
<Component id={id} name={name} event={event} />
<hr />
</Fragment>
</Element>
))}
</div>
</div>