enhancement: store query params in docs feedback (#22437)
Store query params so we can figure out what tab the feedback refers to.
This commit is contained in:
@@ -85,7 +85,13 @@ function Feedback() {
|
||||
const showNo = unanswered || isNo
|
||||
|
||||
async function sendFeedbackVote(response: Response) {
|
||||
const { error } = await supabase.from('feedback').insert({ vote: response, page: pathname })
|
||||
const { error } = await supabase.from('feedback').insert({
|
||||
vote: response,
|
||||
page: pathname,
|
||||
metadata: {
|
||||
query: Object.fromEntries(new URLSearchParams(window.location.search).entries()),
|
||||
},
|
||||
})
|
||||
if (error) console.error(error)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table public.feedback
|
||||
add column metadata jsonb;
|
||||
Reference in New Issue
Block a user