import axios from 'axios';
export default async function fetchPublicIp() {
  try {
      const response = await axios.get('https://ipinfo.io/json');
    return response.data;
  } catch (error) {
    console.error('error', error);
    return null;
  }
}