Skip to content

Instantly share code, notes, and snippets.

@loriculberson
Last active November 4, 2022 02:35
Show Gist options
  • Save loriculberson/96d2c32f28c369ad2bb43b4c90676aaf to your computer and use it in GitHub Desktop.
Save loriculberson/96d2c32f28c369ad2bb43b4c90676aaf to your computer and use it in GitHub Desktop.
nav a {
padding-right: 8px;
text-decoration: none;
}
li {
margin: 8px;
}
export default function News(){
return <h1>News</h1>
}

React Router News App

Navigate through a basic news app

image

const wikiCommons = 'https://upload.wikimedia.org/wikipedia/commons/'
const footballSrc = wikiCommons + '1/1b/American_football_icon_simple.svg'
const basketballSrc = wikiCommons + '7/7a/Basketball.png'
const baseballSrc = wikiCommons + '9/92/Baseball.svg'
const soccerSrc = wikiCommons + '6/6e/Football_%28soccer_ball%29.svg'
const sportsData = [
{ id: 1, title: 'Football', imageSrc: footballSrc },
{ id: 2, title: 'Basketball', imageSrc: basketballSrc },
{ id: 3, title: 'Baseball', imageSrc: baseballSrc },
{ id: 4, title: 'Soccer', imageSrc: soccerSrc }
]
export default sportsData;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment