Skip to content

JSX Lab #25

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 3 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 10 additions & 4 deletions src/components/About.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import React from "react";
import { image } from "../data/data";
import React from "react"
import {image} from "../data/data"

function About() {
return <div>About</div>;
return (
<div id="about">
<h2>About Me</h2>
<p>Blah Blah Blah</p>
<img src={image} alt="I made this"></img>
</div>
)
}

export default About;
export default About
12 changes: 6 additions & 6 deletions src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import NavBar from "./NavBar";
import Home from "./Home";
import About from "./About";
import React from "react"
import NavBar from "./NavBar"
import Home from "./Home"
import About from "./About"

function App() {
return (
@@ -10,7 +10,7 @@ function App() {
<Home />
<About />
</div>
);
)
}

export default App;
export default App
16 changes: 11 additions & 5 deletions 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";
import React from "react"
import {name, city} from "../data/data.js"

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

export default Home;
export default Home
13 changes: 9 additions & 4 deletions src/components/NavBar.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from "react";
import React from "react"

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

export default NavBar;
export default NavBar