mirror of
https://github.com/appwrite/console.git
synced 2026-04-07 19:17:46 +00:00
Make currentPage a required param for sendFeedback
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
await feedback.submitFeedback(
|
||||
`feedback-${$feedback.type}`,
|
||||
$feedbackData.message,
|
||||
$page.url.href,
|
||||
$user.name,
|
||||
$user.email,
|
||||
$organization.billingPlan,
|
||||
$page.url.href,
|
||||
$feedbackData.value
|
||||
);
|
||||
addNotification({
|
||||
|
||||
@@ -112,12 +112,12 @@ function createFeedbackStore() {
|
||||
submitFeedback: async (
|
||||
subject: string,
|
||||
message: string,
|
||||
currentPage: string,
|
||||
name?: string,
|
||||
email?: string,
|
||||
// eslint-disable-next-line
|
||||
// @ts-expect-error
|
||||
billingPlan?: string,
|
||||
currentPage?: string,
|
||||
value?: number
|
||||
) => {
|
||||
if (!VARS.GROWTH_ENDPOINT) return;
|
||||
@@ -133,7 +133,7 @@ function createFeedbackStore() {
|
||||
// billingPlan,
|
||||
firstname: name || 'Unknown',
|
||||
customFields: [
|
||||
{ id: '47364', value: currentPage ?? '' },
|
||||
{ id: '47364', value: currentPage },
|
||||
...(value ? [{ id: '40655', value }] : [])
|
||||
],
|
||||
metaFields: {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Alert, Box, Modal } from '$lib/components';
|
||||
import { Button, InputText, InputTextarea } from '$lib/elements/forms';
|
||||
import { getFormData } from '$lib/helpers/form';
|
||||
@@ -52,7 +53,7 @@
|
||||
const { endpoint, feedback: message } = formData;
|
||||
|
||||
try {
|
||||
await feedback.submitFeedback(`feedback-${$feedback.type}`, message);
|
||||
await feedback.submitFeedback(`feedback-${$feedback.type}`, message, $page.url.href);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Feedback could not be submitted, but we continue to redirect to do export.'
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
await feedback.submitFeedback(
|
||||
`feedback-${$feedback.type}`,
|
||||
$feedbackData.message,
|
||||
$page.url.href,
|
||||
$user.name,
|
||||
$user.email,
|
||||
$organization.billingPlan,
|
||||
$page.url.href,
|
||||
$feedbackData.value
|
||||
);
|
||||
addNotification({
|
||||
|
||||
Reference in New Issue
Block a user