Send Queries
sendQueries
method is used to ask for any query from support or report any issue in system.
submitQuery method
sendQueries method exports sendQueries
method which takes email
, category
and message
as params and returns status
which is the status of request which can be one of success
or failure
, data
is the response data of request, error
is the error message in case of error, isLoading
is the flag for status of request, and submitQueryMethod
is the callBack method which can be called on button click.
Send queries
import React from "react";
import { MetastaqInstance } from "./MetastaqInstance";
export const ShowSubmitQueries = () => {
const { sendQueries } = MetastaqInstance;
const { submitQuery } = sendQueries();
const { status, data, error, isFetching, isLoading, submitQueryMethod } =
submitQuery({
email,
category,
message,
});
return (
<div>
<button
onClick={() => {
submitQueryMethod();
}}
>
Submit your question
</button>
</div>
);
};