chagned Home component name to PostList, organized import statements to be more readable, separated langauge context so there's one export in App.tsx, removed component={<Component>} format from Route Switch in App.tsx
This commit is contained in:
parent
cb7d07ffb7
commit
cf673470f8
12 changed files with 89 additions and 86 deletions
|
@ -3,10 +3,11 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|||
import { faGithub } from "@fortawesome/free-brands-svg-icons"
|
||||
import styled from "styled-components"
|
||||
import ReactTooltip from "react-tooltip"
|
||||
import NavbarData from "../data/NavbarData"
|
||||
import theming from "../theming"
|
||||
|
||||
import { Link } from "react-router-dom"
|
||||
|
||||
import theming from "../theming"
|
||||
import NavbarData from "../data/NavbarData"
|
||||
|
||||
import SearchBox from "./SearchBox"
|
||||
import Sidebar from "./Sidebar"
|
||||
import ThemeToggleButton from "./ThemeToggleButton"
|
||||
|
@ -63,13 +64,11 @@ export default class Navbar extends React.Component {
|
|||
/>
|
||||
</Link>
|
||||
<this.StyledNavLinks>
|
||||
{NavbarData.map((item, index) => {
|
||||
return (
|
||||
<this.StyledLink key={index} to={item.path}>
|
||||
{item.title}
|
||||
</this.StyledLink>
|
||||
)
|
||||
})}
|
||||
{NavbarData.map((item, index) => (
|
||||
<this.StyledLink key={index} to={item.path}>
|
||||
{item.title}
|
||||
</this.StyledLink>
|
||||
))}
|
||||
</this.StyledNavLinks>
|
||||
|
||||
<ThemeToggleButton />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue