Skip to content

Commit

Permalink
Fix get request to use origin instead of hardcoded value
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLathen committed Oct 29, 2016
1 parent 7b3ae0f commit 35be073
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/app/Landing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Grid, Row, Col, Clearfix, Button, Panel, Tooltip, ButtonToolbar, Overlay
import Form from './LandingForm.jsx';

const Landing = (props) => {
const origin = window.location.origin;
const App = props.App;
const newBoard = () => {
console.log('button clicked');
Expand All @@ -13,7 +14,7 @@ const Landing = (props) => {
window.location.hash = newBoardId;
ReactDOM.render(<App />, document.getElementById('root'));
});
requestBoard.open('GET', 'http://localhost:3000/board');
requestBoard.open('GET', origin + '/board');
requestBoard.send();
};

Expand Down

0 comments on commit 35be073

Please sign in to comment.