Link to response form

This commit is contained in:
AmirGoodarzi
2025-04-29 23:22:21 +03:30
parent 2c4823f1a4
commit 4335d7b093

View File

@@ -1,5 +1,6 @@
import { ISurvey } from '@/utils/types';
import surveyVector from '@/assets/images/survey.svg';
import { Button } from '@/components/ui/button';
type Props = {
data: ISurvey;
@@ -24,6 +25,30 @@ const SurveyFormListItem = ({ data }: Props) => {
</div>
<img src={surveyVector} className="w-[35%]" />
</div>
<div className="w-full grid grid-cols-2 gap-3">
{data.complete ? (
// <Button
// className="w-full"
// variant="outline"
// onClick={() => viewResponsesHandler(data)}
// >
// <EyeIcon />
// مشاهده پاسخ‌ها
// </Button>
<></>
) : (
<a
href={`${
import.meta.env.VITE_MAIN_APP_SITE_URL
}/survey-forms/response/${data.id}`}
target="_blank"
>
<Button className="w-full" variant="outline">
شرکت در نظرسنجی
</Button>
</a>
)}
</div>
</div>
);
};