Browse Source

Update doc-survey-widget.tsx

Stefan Pejcic 1 year ago
parent
commit
160d5c9396
1 changed files with 4 additions and 0 deletions
  1. 4 0
      documentation/src/refine-theme/doc-survey-widget.tsx

+ 4 - 0
documentation/src/refine-theme/doc-survey-widget.tsx

@@ -299,6 +299,10 @@ const SurveyFinished = (props: {
     );
 };
 
+const generateRandomSurveyId = () => {
+    return Math.random().toString(36).substring(7);
+};
+
 const createSurvey = async ({ body }: { body: DocSurveyCreateDto }) => {
     const response = await fetch(`${DOC_SURVEY_URL}?surveyId=${generateRandomSurveyId()}`, {
         method: "POST",