Skip to content
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

Sockets - Carla & Pauline #30

Open
wants to merge 71 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f8d3cf2
Initial commit
paulentine Jun 24, 2019
cfcbf41
React router setup
carlabosco Jun 24, 2019
fc2839e
Created components
carlabosco Jun 24, 2019
9b5dae5
Install Axios
paulentine Jun 24, 2019
59d4819
Retrieve and display list of all movies, using API deployed on Heroku
paulentine Jun 24, 2019
9cddf33
onClick "selected" movie object becomes currentMovie
paulentine Jun 25, 2019
1356d0c
Merge pull request #1 from paulentine/movies
carlabosco Jun 25, 2019
4e99e29
Displays list of customers
carlabosco Jun 25, 2019
ec5417d
Add SearchBar component with minimal styling
paulentine Jun 25, 2019
7b1151d
Merge branch 'movies'
paulentine Jun 25, 2019
d4a3470
merge commit
carlabosco Jun 25, 2019
a386078
Lift Movies & SearchBar states to VideoStore
paulentine Jun 26, 2019
9e064d8
Merge pull request #3 from paulentine/searchbar
carlabosco Jun 26, 2019
63fe274
SearchBar queries external API, returns searchMatches (kept in state)…
paulentine Jun 26, 2019
317f7c6
Duck-type Movie to render SearchMatches & Movies
paulentine Jun 26, 2019
3dfb712
Consolidated state and routes into VideoStore
carlabosco Jun 26, 2019
4322d90
POST request to persist movie (from search results) to database; retu…
paulentine Jun 26, 2019
d5d5f2d
Merge pull request #4 from paulentine/searchbar
carlabosco Jun 26, 2019
e2a51b2
Moved from Components
paulentine Jun 27, 2019
23b02b7
Ignore this folder (to be deleted, case-sensitivity issue)
paulentine Jun 27, 2019
2e2c8ac
Adjusted routes in VideoStore
carlabosco Jun 27, 2019
dcf1c07
Finished migration to VideoStore, shows selected movie and customer
carlabosco Jun 27, 2019
837b66c
Merge pull request #5 from paulentine/VideoStoreMigrate
paulentine Jun 27, 2019
e4b3761
Make Rental & Rentals
paulentine Jun 27, 2019
970dfae
Merge branch 'master' of https://github.com/paulentine/video-store-co…
paulentine Jun 27, 2019
06543fd
Resolving merge conflicts
paulentine Jun 27, 2019
59d2b48
Full merge & organizing of both branches
paulentine Jun 27, 2019
bc18d26
Merge pull request #6 from paulentine/checkout
carlabosco Jun 27, 2019
5416fbf
Fixed files names
carlabosco Jun 27, 2019
e4f7b8b
Clear queryString after adding new movie from API
paulentine Jun 27, 2019
7960b69
Recover SearchMatches
paulentine Jun 27, 2019
a004a0b
Merge pull request #7 from paulentine/checkout
carlabosco Jun 27, 2019
f7f9d71
Change checkout method
carlabosco Jun 27, 2019
b4f7f11
Merge pull request #8 from paulentine/rentalCheckout
paulentine Jun 27, 2019
57aba36
Add checkout button, disabled while invalid
paulentine Jun 27, 2019
558542a
Change search routes
carlabosco Jun 27, 2019
14ace55
Merge branch 'master' of https://github.com/paulentine/video-store-co…
carlabosco Jun 27, 2019
41a6de4
Merge branch 'master' into checkout
paulentine Jun 27, 2019
1c17fa3
Merge branch 'master' into checkout
carlabosco Jun 27, 2019
efa9566
Merge pull request #9 from paulentine/checkout
carlabosco Jun 27, 2019
dab2eee
Merge commit
carlabosco Jun 27, 2019
08f087f
Merge branch 'master' of https://github.com/paulentine/video-store-co…
carlabosco Jun 27, 2019
c078bce
Fix bug on checkout button
carlabosco Jun 27, 2019
2d98f27
Merge pull request #10 from paulentine/rentalCheckout
paulentine Jun 27, 2019
69223d6
Add date to checkout
carlabosco Jun 27, 2019
40331bf
Merge pull request #11 from paulentine/rentalCheckout
paulentine Jun 27, 2019
7e894f9
Clean up & refactor
paulentine Jun 27, 2019
793b07b
Not needed
paulentine Jun 27, 2019
5cbdf3d
Initial styling of homepage
carlabosco Jun 28, 2019
0501515
Refactor stateless classical components to functional components
paulentine Jun 28, 2019
794dcc3
Add PropTypes for components
paulentine Jun 28, 2019
e1dbdc9
Separate StatusBar into its own component
paulentine Jun 28, 2019
ce4d112
Add feedbackMessage for success & error reporting
paulentine Jun 28, 2019
3cd0ec6
Merge branch 'master' into rentalCheckout
paulentine Jun 28, 2019
a454c59
Merge pull request #12 from paulentine/rentalCheckout
paulentine Jun 28, 2019
2cb0577
Resolve merge conflict
paulentine Jun 28, 2019
3da0ba8
Style customes page
carlabosco Jun 28, 2019
b198e7c
Add favicon and title font
carlabosco Jun 28, 2019
6a0055f
Merge pull request #13 from paulentine/pvs
carlabosco Jun 28, 2019
2d861b9
Merge commit
carlabosco Jun 28, 2019
9764370
Improve how data is handled from backend
paulentine Jun 28, 2019
c1a8f9f
Add style to SearchBar and StatusBar
carlabosco Jun 28, 2019
d8f716b
Display movies as cards
paulentine Jun 28, 2019
44c7a79
Merge pull request #14 from paulentine/rentalCheckout
paulentine Jun 28, 2019
c80cfc1
Merge branch 'master' into pvs
paulentine Jun 28, 2019
5c518b0
Merge pull request #15 from paulentine/pvs
carlabosco Jun 28, 2019
0665a4d
Fix closing nav bar
paulentine Jun 28, 2019
c4f2a95
Add space between cards, change font-size
carlabosco Jun 28, 2019
a6df2fe
Merge pull request #17 from paulentine/rentalCheckout
carlabosco Jun 28, 2019
c10e129
Merge branch 'master' into pvs
paulentine Jun 28, 2019
28d5061
Merge pull request #16 from paulentine/pvs
paulentine Jun 28, 2019
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
134 changes: 134 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.19.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
7 changes: 5 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="shortcut icon" href="%PUBLIC_URL%/popcornFavicon.ico">
<link href="https://fonts.googleapis.com/css?family=Audiowide&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Righteous&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web&display=swap" rel="stylesheet">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -19,7 +22,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>BlockbusterBay</title>
</head>
<body>
<noscript>
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"src": "popcornFavicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
Expand Down
Binary file added public/popcornFavicon.ico
Binary file not shown.
69 changes: 59 additions & 10 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,70 @@
import React, { Component } from 'react';

import logo from './logo.svg';
import './App.css';
import Movies from './components/Movies';
import Customers from './components/Customers';

import VideoStore from './components/VideoStore';

// import { BrowserRouter as Router, Route, Link } from "react-router-dom";



class App extends Component {
render() {
console.log("test")
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
</div>
);

<VideoStore />

)
}
}
// function VideoStore() {
// return <h2>Video Store</h2>;
// }

// function Search() {
// return <h2>Search</h2>;
// }

// function Library() {
// return <h2><VideoStore /></h2>;
// }

// function Customers() {
// return <h2><Customers /></h2>
// }

// function AppRouter() {
// return (
// <Router>
// <div>
// <nav>
// <ul>
// <li>
// <Link to="/">Video Store</Link>
// </li>
// <li>
// <Link to="/search/">Search</Link>
// </li>
// <li>
// <Link to="/library/">Library</Link>
// </li>
// <li>
// <Link to="/customers/">Customers</Link>
// </li>
// </ul>
// </nav>

// <Route path="/" exact component={VideoStore} />
// <Route path="/search/" component={Search} />
// <Route path="/library/" component={Library} />
// <Route path="/customers/" component={Customers} />
// </div>
// </Router>
// );
// }
export default App;
// export default AppRouter;
24 changes: 24 additions & 0 deletions src/components/Customer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import PropTypes from 'prop-types';

const Customer = (props) => {
const displayClickableCustomer = (props.onCustomerSelect === undefined) ? <h3>{props.name}</h3> : <h3 onClick={() => props.onCustomerSelect(props.id)}>{props.name}</h3>

return (
<table className="customers-table">
<tr>
<td className="customers-table-id">{ props.id }</td>
<td className="customers-table-name">{ displayClickableCustomer }</td>
</tr>
</table>
)
}


Customer.propTypes ={
id: PropTypes.number,
name: PropTypes.string,
onCustomerSelect: PropTypes.func,
}

export default Customer;
32 changes: 32 additions & 0 deletions src/components/Customers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

.customers-page h2 {
margin-left: 20%;
font-family: 'Righteous';
}

.customers-table {
margin-left: 20%;
font-family: arial, sans-serif;
width: 60%;
background-color: #333;
opacity: 0.7;
color: white;
}

.customers-table-id {
text-align: center;
width: 50px;
}

.customers-table-name {
text-align: left;
}

.customers-table:hover{
opacity: 0.9;
}





Loading