From 160d5c93960ca17c0075e6355725f35afbe1d6f1 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Sun, 11 Feb 2024 19:44:25 +0100 Subject: [PATCH] Update doc-survey-widget.tsx --- documentation/src/refine-theme/doc-survey-widget.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/documentation/src/refine-theme/doc-survey-widget.tsx b/documentation/src/refine-theme/doc-survey-widget.tsx index 175a4fe..a30fbe8 100644 --- a/documentation/src/refine-theme/doc-survey-widget.tsx +++ b/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",