Skip to content

Commit

Permalink
Remove hello world code from react and rails app
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinesalib committed Nov 15, 2019
1 parent 18d3985 commit 32ebe38
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 104 deletions.
10 changes: 0 additions & 10 deletions app/controllers/v1/things_controller.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/javascript/components/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react"
import HelloWorld from "./HelloWorld";
import {BrowserRouter, Switch, Route} from "react-router-dom";
import {Provider} from 'react-redux';
import configureStore from '../configureStore';
Expand All @@ -25,7 +24,6 @@ class App extends React.Component {
<BrowserRouter>
<Switch>
<Route exact path="/" render={() => ("Home!")}/>
<Route path="/hello" render={() => <HelloWorld greeting="Friend"/>}/>
<Route path="/new/ongs" render={() => <NgosList />}/>
<Route exact path="/new/ong/:id" component={NgoPage}/>
<Route path="/adocao" render={() => <AdoptionList userEmail={this.state.userEmail} />}/>
Expand Down
59 changes: 0 additions & 59 deletions app/javascript/components/HelloWorld.js

This file was deleted.

7 changes: 1 addition & 6 deletions app/javascript/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';

const initialState = {
things: [
]
};
const initialState = { };

function rootReducer(state, action) {
switch (action.type) {
case "GET_THINGS_SUCCESS":
return { things: action.json.things };
case "GET_NGOS_SUCCESS":
return { ngos: action.json.ngos };
case "GET_NGO_SUCCESS":
Expand Down
26 changes: 0 additions & 26 deletions app/javascript/packs/hello_react.jsx

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
end

namespace :v1, defaults: { format: 'json' } do
get 'things', to: 'things#index'
get 'ngos', to: 'ngos#index'
get 'ngo_cities', to: 'ngos#cities'
get 'ngo/:id', to: 'ngos#show'
Expand Down

0 comments on commit 32ebe38

Please sign in to comment.