Permalink
Browse files

working app

  • Loading branch information...
kmocon06 committed Feb 13, 2020
1 parent 3e71858 commit 8b0905f83dd09af103a392fce7c2525788cba26d
Showing with 576 additions and 105 deletions.
  1. +1 −0 .env.development
  2. +25 −47 README.md
  3. +125 −0 package-lock.json
  4. +3 −1 package.json
  5. +0 −35 src/App.css
  6. +4 −15 src/App.js
  7. +229 −0 src/DogContainer/index.js
  8. +33 −0 src/DogList/index.js
  9. +74 −0 src/EditDogModal/index.js
  10. +81 −0 src/NewDogForm/index.js
  11. +1 −0 src/index.js
  12. +0 −7 src/logo.svg
@@ -0,0 +1 @@
REACT_APP_API_URL=http://localhost:8000
@@ -1,68 +1,46 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts
#REACT environment variables
https://create-react-app.dev/docs/adding-custom-environment-variables/

In the project directory, you can run:

### `npm start`
note: you will need to stop and restart the `npm start` create-react-app development environment/server to see this change

Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.
The app now has a fetch call to get the dogs programmed, but it doesn't work

### `npm test`
because of CORS!!!!! 😡
CORS (Cross-Origin Resource Sharing)

Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

### `npm run build`
BROWSERS implement this for security reasons

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
To fix it you program your server to speak to certain clients that it recognizes

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
IOW server uses HTTP headers and sometimes also a response to an OPTIONS request
to say who's allowed to connect and what they're allowed to do

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
SEMANTIC UI
https://react.semantic-ui.com/

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
To install it,

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
`npm install semantic-ui-css semantic-ui-react`

## Learn More
Then `index.js`
Add this line
```js
import 'semantic-ui-css/semantic.min.css'
````
before this line
```js
import './index.css';
```

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

### Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

### Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

### Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

### Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

### `npm run build` fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -8,7 +8,9 @@
"@testing-library/user-event": "^7.2.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.1"
"react-scripts": "3.3.1",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^0.88.2"
},
"scripts": {
"start": "react-scripts start",
@@ -1,38 +1,3 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@@ -1,24 +1,13 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import DogContainer from './DogContainer'

function App() {
//console.log(process.env);
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<h1>Dogs</h1>
<DogContainer />
</div>
);
}
Oops, something went wrong.

0 comments on commit 8b0905f

Please sign in to comment.