Skip to content

Completed JSX Lab #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import React from "react";
import { image } from "../data/data";

function About() {
return <div>About</div>;
return <div id='about'>
<h2>About Me</h2>
<p>Shes a web dev from NYC!</p>
<img src={image} alt='I made this'></img>
</div>;
}

export default About;
8 changes: 7 additions & 1 deletion src/components/Home.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import React from "react";
import { name, city } from "../data/data.js";

const divStyle = {
color: 'firebrick'
};

function Home() {
// update the JSX being returned!
return <div>Home</div>;
return <div id='home'>
<h1 style={divStyle}>{name} is a Web Developer from {city}</h1>
</div>;
}

export default Home;
5 changes: 4 additions & 1 deletion src/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import React from "react";

function NavBar() {
// update the JSX being returned!
return <nav>NavBar</nav>;
return <nav>
<a href='#home'>Home</a>
<a href='#about'>About</a>
</nav>;
}

export default NavBar;