fix: signin page type (#671)

This commit is contained in:
Aaryan Khandelwal 2023-04-03 15:07:39 +05:30 committed by GitHub
parent 353197f583
commit 12ad3892f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 26 deletions

View File

@ -121,7 +121,7 @@ export const EmailCodeForm = ({ onSuccess }: any) => {
) || "Email ID is not valid", ) || "Email ID is not valid",
}} }}
error={errors.email} error={errors.email}
placeholder="Enter you email Id" placeholder="Enter your Email ID"
/> />
</div> </div>

View File

@ -110,8 +110,7 @@ export const SingleBoardIssue: React.FC<Props> = ({
handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData), handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData),
false false
); );
else if (moduleId)
if (moduleId)
mutate< mutate<
| { | {
[key: string]: IIssue[]; [key: string]: IIssue[];
@ -123,18 +122,18 @@ export const SingleBoardIssue: React.FC<Props> = ({
handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData), handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData),
false false
); );
else
mutate< mutate<
| { | {
[key: string]: IIssue[]; [key: string]: IIssue[];
} }
| IIssue[] | IIssue[]
>( >(
PROJECT_ISSUES_LIST_WITH_PARAMS(projectId as string, params), PROJECT_ISSUES_LIST_WITH_PARAMS(projectId as string, params),
(prevData) => (prevData) =>
handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData), handleIssuesMutation(formData, groupTitle ?? "", selectedGroup, index, prevData),
false false
); );
issuesService issuesService
.patchIssue(workspaceSlug as string, projectId as string, issue.id, formData) .patchIssue(workspaceSlug as string, projectId as string, issue.id, formData)

View File

@ -81,8 +81,8 @@ export const SingleViewItem: React.FC<Props> = ({ view, setSelectedView }) => {
}; };
return ( return (
<> <Link href={`/${workspaceSlug}/projects/${projectId}/views/${view.id}`}>
<Link href={`/${workspaceSlug}/projects/${projectId}/views/${view.id}`}> <a>
<div className="flex items-center cursor-pointer justify-between border-b bg-white p-4 first:rounded-t-[10px] last:rounded-b-[10px]"> <div className="flex items-center cursor-pointer justify-between border-b bg-white p-4 first:rounded-t-[10px] last:rounded-b-[10px]">
<div className="flex flex-col w-full gap-3"> <div className="flex flex-col w-full gap-3">
<div className="flex justify-between w-full"> <div className="flex justify-between w-full">
@ -137,7 +137,7 @@ export const SingleViewItem: React.FC<Props> = ({ view, setSelectedView }) => {
)} )}
</div> </div>
</div> </div>
</Link> </a>
</> </Link>
); );
}; };

View File

@ -80,11 +80,8 @@ export const handleIssuesMutation: THandleIssuesMutation = (
let newGroup: IIssue[] = []; let newGroup: IIssue[] = [];
if (selectedGroupBy === "priority") { if (selectedGroupBy === "priority") newGroup = prevData[formData.priority ?? ""] ?? [];
newGroup = prevData[formData.priority ?? ""] ?? []; else if (selectedGroupBy === "state") newGroup = prevData[formData.state ?? ""] ?? [];
} else if (selectedGroupBy === "state") {
newGroup = prevData[formData.state ?? ""] ?? [];
}
const updatedIssue = { const updatedIssue = {
...oldGroup[issueIndex], ...oldGroup[issueIndex],

View File

@ -108,7 +108,7 @@ const useIssuesView = () => {
const statesList = getStatesList(states ?? {}); const statesList = getStatesList(states ?? {});
const stateIds = statesList.map((state) => state.id); const stateIds = statesList.map((state) => state.id);
const emptyStatesObject: { [key: string]: [] } = {}; const emptyStatesObject: { [key: string]: [] } = useMemo(() => ({}), []);
for (let i = 0; i < stateIds.length; i++) { for (let i = 0; i < stateIds.length; i++) {
emptyStatesObject[stateIds[i]] = []; emptyStatesObject[stateIds[i]] = [];
} }
@ -125,7 +125,15 @@ const useIssuesView = () => {
return issuesToGroup ? Object.assign(emptyStatesObject, issuesToGroup) : undefined; return issuesToGroup ? Object.assign(emptyStatesObject, issuesToGroup) : undefined;
return issuesToGroup; return issuesToGroup;
}, [projectIssues, cycleIssues, moduleIssues, groupByProperty, cycleId, moduleId]); }, [
projectIssues,
cycleIssues,
moduleIssues,
groupByProperty,
cycleId,
moduleId,
emptyStatesObject,
]);
const isEmpty = const isEmpty =
Object.values(groupedByIssues ?? {}).every((group) => group.length === 0) || Object.values(groupedByIssues ?? {}).every((group) => group.length === 0) ||