<commit_before>import { useMoralis } from 'react-moralis';
import { navigate } from 'gatsby-link';

export function GuestbookAuth() {
  const { authenticate, logout, Moralis } = useMoralis();

  return {
    login: async () => {
      Moralis.Web3.getSigningData = () =>
        'Sign the web3 guestbook on iammatthias.com';
      try {
        await authenticate({
          provider: 'walletconnect',
          onSuccess: () => {
            navigate('/guestbook');
            logout();
          },
        });
      } catch (e) {
        console.error(e.message, e);
      }
    },
  };
}<commit_msg>Add alert post guestbook sign (remove this later)<commit_after>import { useMoralis } from 'react-moralis';
import { navigate } from 'gatsby-link';

export function GuestbookAuth() {
  const { authenticate, logout, Moralis } = useMoralis();

  return {
    login: async () => {
      Moralis.Web3.getSigningData = () =>
        'Sign the web3 guestbook on iammatthias.com';
      try {
        await authenticate({
          provider: 'walletconnect',
          onSuccess: () => {
            navigate('/guestbook');
            logout();
            alert('yay');
          },
        });
      } catch (e) {
        console.error(e.message, e);
      }
    },
  };
}
{'fraction_non_alphanumeric': 0.14229559748427673, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 2.052757793764988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4899923', 'n_tokens_mistral': 396, 'n_tokens_neox': 391, 'n_words': 84}