Skip to content

Commit

Permalink
modified the app to work in development mode
Browse files Browse the repository at this point in the history
fixed host page place search bad container error
  • Loading branch information
jalajcodes committed Oct 26, 2020
1 parent b319c44 commit a99b91d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const authLink = setContext((_, { headers }) => {
});

const httpLink = createHttpLink({
uri: 'https://hsh-server.herokuapp.com/api',
uri: process.env.REACT_APP_ENV === 'development' ? '/api' : 'https://hsh-server.herokuapp.com/api',
credentials: 'include',
});

Expand Down
4 changes: 3 additions & 1 deletion src/sections/Host/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ export const Host = () => {
});

useEffect(() => {
// console.log('addressRef.current out', addressRef.current);
if (addressRef.current !== undefined) {
// console.log('addressRef.current', addressRef.current);
const place = window.placeSearch({
key: process.env.REACT_APP_M_KEY,
container: addressRef.current,
container: document.querySelector('#placeSearch'),
});
place.on('change', (e: any) => {
form.setFieldsValue({
Expand Down

0 comments on commit a99b91d

Please sign in to comment.