Skip to content

Commit

Permalink
Merge pull request #44 from Dcastro99/dannyData
Browse files Browse the repository at this point in the history
Danny data
  • Loading branch information
ArzuVon authored Sep 29, 2022
2 parents d6355d2 + 68f9102 commit 0f96a49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion backend/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const server = http.createServer(app);

const io = new Server(server, {
cors: {
origin: "http://localhost:3000",
// origin: "http://localhost:3000",
origin: "/",
methods: ["GET", "POST"],
},
});
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import ReactLoading from 'react-loading';
import { withAuth0 } from '@auth0/auth0-react';
import Welcome from '../../frontend/src/components/Welcome/index';
import Welcome from './components/Welcome';
import axios from 'axios';
import ExplorePage from './pages/ExplorePage.js';
import AboutUsPage from './pages/AboutUsPage.js';
Expand All @@ -23,7 +23,7 @@ class App extends React.Component {
allTrails: [],
};
}

//fixed env
componentDidMount() {
this.handleGetAllTrails();
}
Expand Down Expand Up @@ -69,7 +69,7 @@ class App extends React.Component {
<HomePage allTrails={this.state.allTrails} auth0={this.props.auth0} />
}
/>
<Route path="Trails" element={<Trails />} />
<Route path="/trails" element={<Trails />} />
<Route exact path='/weather' element={< Weather />} />
<Route exact path='/explore' element={< ExplorePage auth0={this.props.auth0} />} />
<Route exact path='/profile' element={< ProfilePage auth0={this.props.auth0} />} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Socket-io/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Chat(props) {
return chat.map(({ name, message }, index) => (
<div key={index}>
<h3>
<p id='userName'>{user.given_name}:</p> <span id='chatmessage'>{message}</span>
<p id='userName'>{user.name}:</p> <span id='chatmessage'>{message}</span>
</h3>
</div>
))
Expand Down

0 comments on commit 0f96a49

Please sign in to comment.