File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
frontend/src/pages/Admin/SurveysPage Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -630,15 +630,17 @@ const AdminSurveys = () => {
630630 { isPublishing ? 'Publishing...' : 'Publish' }
631631 </ button >
632632 ) }
633- < button
634- onClick = { ( ) => {
635- closeDetailModal ( ) ;
636- navigate ( `/admin/surveys/edit/${ selectedSurvey . id } ` ) ;
637- } }
638- className = 'px-6 py-2.5 bg-[#D54242] hover:bg-[#b53a3a] text-white rounded-xl font-medium transition'
639- >
640- Edit
641- </ button >
633+ { ! selectedSurvey . isPublished && (
634+ < button
635+ onClick = { ( ) => {
636+ closeDetailModal ( ) ;
637+ navigate ( `/admin/surveys/edit/${ selectedSurvey . id } ` ) ;
638+ } }
639+ className = 'px-6 py-2.5 bg-[#D54242] hover:bg-[#b53a3a] text-white rounded-xl font-medium transition'
640+ >
641+ Edit
642+ </ button >
643+ ) }
642644 < button
643645 onClick = { closeDetailModal }
644646 className = 'px-6 py-2.5 bg-[#D54242] hover:bg-[#b53a3a] text-white rounded-xl font-medium transition'
You can’t perform that action at this time.
0 commit comments