Hi I tried to make a hyperlink button in react that opens an email client(like Mail app in Windows) to send email to someone as an Ask an Advocate inquiry but all it does when linked is open the webapp with a "?" added on the end. Can anyone tell me why that is or how to fix it? (Code shown below for file)
import React, { Component } from "react";
import { useState } from "react";
import styles from "./Advocate.css"
import {Linking} from "react-native";
const Advocate = () => {
const [title, setTitle] = useState('');
//this creates a simple title and a form, which can take input and will be handled in the backend
return <div className={"advocate-section"} id={"aaa"} >
<h2>Ask an Advocate</h2>
<form>
<button onPress={() => Linking.openURL('mailto:mb20732@bristol.ac.uk?subject=Advocate Inquiry') }
title="mb20732@bristol.ac.uk" />
</form>
</div>
}
export default Advocate;
Thanks for the help!