Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Nov 15, 2024
1 parent aeda07b commit c8dc7a9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ import './global.css';

import { useMutation } from '@tanstack/react-query';

export const BACKEND_URL = 'https://poap-distributor.c5.v3x.systems';
export const BACKEND_URL = 'https://music-poap-distributor.c5.v3x.systems';

export const App = () => {
const { mutate } = useMutation({
mutationFn: async () => {
// fetch poap from backend url /poap and if successfull redirect user to link inside {data: 'https://...'}
const response = await fetch(`${BACKEND_URL}/poap`);
const response = await fetch(`${BACKEND_URL}/poap`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
const data = await response.json();

if (response.ok) {
// eslint-disable-next-line no-undef
window.location.href = data.data;
}
},
Expand Down

0 comments on commit c8dc7a9

Please sign in to comment.