diff --git a/components/avatar-user.tsx b/components/avatar-user.tsx index 7ba1038..f715517 100644 --- a/components/avatar-user.tsx +++ b/components/avatar-user.tsx @@ -50,8 +50,8 @@ export function AvatarUser() {
{data && data.exists && data.data.premium && ( -
- +
+
)} View form -

- {dataForm.published - ? "Your form is currently online and can be viewed and answered by anyone at the link" - : "Your form is not published so can only be seen by you alone"} -

- {isLoadingUpdateForm ? ( - - ) : ( -

changeStatutOfForm()} - > - {!dataForm?.published ? "Publish" : "Unpublish"} your form -

+ {dataForm.idAuthor === userPseudo && ( + <> +

+ {dataForm.published + ? "Your form is currently online and can be viewed and answered by anyone at the link" + : "Your form is not published so can only be seen by you alone"} +

+ <> + {isLoadingUpdateForm ? ( + + ) : ( +

changeStatutOfForm()} + > + {!dataForm?.published ? "Publish" : "Unpublish"} your form +

+ )} + + )} {isSuccessUpdateForm && (
-
- - - - - - - - - - -
- + {dataForm.idAuthor === userPseudo && ( + <> +
+ + + + + + + + + + +
+ + + )}
{errors.questions[index].text.message}

)} */} - + {dataForm.idAuthor === userPseudo && ( + + )}
) })} @@ -390,18 +399,20 @@ export default function QuestionsForms({ dataForm }: { dataForm: any }) {
)} - + {dataForm.idAuthor === userPseudo && ( + + )}
) diff --git a/components/form/settings.tsx b/components/form/settings.tsx index c144d35..46e6ee3 100644 --- a/components/form/settings.tsx +++ b/components/form/settings.tsx @@ -394,11 +394,11 @@ export default function SettingsForms({ dataForm }: { dataForm: any }) {

- The people you have added will be able to modify and view the - answers to this form. + The added persons will be able to consult the answers to your + form.

-
+
{ @@ -425,22 +425,22 @@ export default function SettingsForms({ dataForm }: { dataForm: any }) {
{dataForm.collaborators.length !== 0 && ( -
+
{dataForm.collaborators.map((collaborator, index) => (
-
+ { isLoadingUpdateForm ? undefined @@ -534,8 +534,8 @@ export default function SettingsForms({ dataForm }: { dataForm: any }) {
*/} -
-
+
+