In the 3rd post,we make AndroidClosingTestPairs get the tester's behavior using deeplink, now we need to submit this behavior, so that App's author can know who have tested his app.
firstly: we need to create a table to save the tester's info
you can easily add columns in Supabase's table editor without writing any SQL
then, just call the supabase write function in the client, I wrappered the logic with react-query here
`
export const useSaveSubmissionForm = createMutation({
mutationKey: ['save-submission'],
mutationFn: async (formValue) => {
const { data, error } = await supabase
.from(TABLE_NAME)
.insert({
email: formValue.email,
app_name: formValue.app_name,
// tester: formValue.tester,
})
.select('*')
.single()
if (error) {
throw new Error(error.message);
}
return data as SubmissionFormType;
},
});
`
Finally, we get the info
what's next?
we will let app's author know who has tested his app, and easily jump into the helper's app,make a test back.