From f322bcc4b0998730b07c330c90fdbf987294992b Mon Sep 17 00:00:00 2001 From: Dakshesh Jain Date: Wed, 21 Dec 2022 11:31:51 +0530 Subject: [PATCH 1/2] fix: mutation on set new default button refractor: moved all filter option to constants file, style: UI/UX improvement on create-update-issue model when there's an similar issue --- .../create-update-issue-modal/index.tsx | 48 ++++++++++--------- apps/app/constants/index.ts | 35 ++++++++++++++ apps/app/contexts/theme.context.tsx | 14 +++--- .../projects/[projectId]/cycles/[cycleId].tsx | 33 +------------ .../projects/[projectId]/issues/index.tsx | 36 ++------------ 5 files changed, 71 insertions(+), 95 deletions(-) diff --git a/apps/app/components/project/issues/create-update-issue-modal/index.tsx b/apps/app/components/project/issues/create-update-issue-modal/index.tsx index a527cc588..275a098bc 100644 --- a/apps/app/components/project/issues/create-update-issue-modal/index.tsx +++ b/apps/app/components/project/issues/create-update-issue-modal/index.tsx @@ -1,7 +1,8 @@ import React, { useEffect, useState } from "react"; // next -import { useRouter } from "next/router"; import dynamic from "next/dynamic"; +import Link from "next/link"; +import { useRouter } from "next/router"; // swr import { mutate } from "swr"; // react hook form @@ -244,8 +245,6 @@ const CreateUpdateIssuesModal: React.FC = ({ return () => setMostSimilarIssue(undefined); }, []); - // console.log(watch("parent")); - return ( <> {activeProject && ( @@ -323,27 +322,30 @@ const CreateUpdateIssuesModal: React.FC = ({ {mostSimilarIssue && (

- Did you mean{" "} - - ? + + Did you mean + + { + issues?.results.find((i) => i.id === mostSimilarIssue) + ?.project_detail.identifier + } + - + { + issues?.results.find((i) => i.id === mostSimilarIssue) + ?.sequence_id + } + :{" "} + { + issues?.results.find((i) => i.id === mostSimilarIssue) + ?.name + }{" "} + + ? + + {" "}