Skip to content

Commit

Permalink
Create function for API domain
Browse files Browse the repository at this point in the history
  • Loading branch information
aleda145 committed Aug 4, 2022
1 parent 015fb0c commit c304092
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ const queryClient = new QueryClient({
},
},
});
export function getApiDomain() {
return process.env.REACT_APP_API_URL;
}

function App() {
const client = new PocketBase("http://localhost:8090");
const client = new PocketBase(getApiDomain());
const [isLoggedIn, setIsLoggedIn] = useState(client.AuthStore.isValid);

console.log(client.AuthStore.isValid);
Expand Down

0 comments on commit c304092

Please sign in to comment.