Skip to content

Commit

Permalink
made changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akintewe committed Nov 29, 2024
1 parent adb66a9 commit f3919d2
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions apps/mobile/src/hooks/api/indexer/useMyTokensCreated.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
import {useQuery} from '@tanstack/react-query';
import {ApiIndexerInstance} from '../../../services/api';
import {useEffect} from 'react';

// Add this function to test the connection
const testEndpoint = async () => {
try {
console.log('Testing username-claimed endpoint...');
const res = await fetch('https://afk-monorepo.onrender.com/username-claimed');
console.log('Response status:', res.status);
const data = await res.json();
console.log('Response data:', data);
return data;
} catch (error) {
console.error('Endpoint test failed:', error);
throw error;
}
};

export const useMyTokensCreated = (launch?: string) => {
// Add the test call
useEffect(() => {
testEndpoint();
}, []);

return useQuery({
queryKey: launch ? ['token', launch] : ['deploy_launch'],
queryFn: async () => {
Expand Down

0 comments on commit f3919d2

Please sign in to comment.