[WEB-2001] chore: Code refactor for noload changes. (#5683)
* use common getIssues from issue service instead of multiple different services for modules and cycles * add group by to server constants * change issue detail's overview's is loading logic to the loader from the store * add extra method in local storage * Kanban render 10 issues by default per column * fix height in group virtualization * remove debounced code for Kanban fetching more issues per column * fix lint errors
This commit is contained in:
parent
5ca794b648
commit
6170a80757
15 changed files with 105 additions and 66 deletions
|
|
@ -19,12 +19,12 @@ const ArchivedIssueDetailsPage = observer(() => {
|
|||
// hooks
|
||||
const {
|
||||
fetchIssue,
|
||||
issue: { getIssueById },
|
||||
issue: { getIssueById, isFetchingIssueDetails },
|
||||
} = useIssueDetail();
|
||||
|
||||
const { getProjectById } = useProject();
|
||||
|
||||
const { isLoading } = useSWR(
|
||||
useSWR(
|
||||
workspaceSlug && projectId && archivedIssueId
|
||||
? `ARCHIVED_ISSUE_DETAIL_${workspaceSlug}_${projectId}_${archivedIssueId}`
|
||||
: null,
|
||||
|
|
@ -40,7 +40,7 @@ const ArchivedIssueDetailsPage = observer(() => {
|
|||
|
||||
if (!issue) return <></>;
|
||||
|
||||
const issueLoader = !issue || isLoading ? true : false;
|
||||
const issueLoader = !issue || isFetchingIssueDetails ? true : false;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ const IssueDetailsPage = observer(() => {
|
|||
// store hooks
|
||||
const {
|
||||
fetchIssue,
|
||||
issue: { getIssueById },
|
||||
issue: { getIssueById, isFetchingIssueDetails },
|
||||
} = useIssueDetail();
|
||||
const { getProjectById } = useProject();
|
||||
const { toggleIssueDetailSidebar, issueDetailSidebarCollapsed } = useAppTheme();
|
||||
// fetching issue details
|
||||
const { isLoading, error } = useSWR(
|
||||
const { error } = useSWR(
|
||||
workspaceSlug && projectId && issueId ? `ISSUE_DETAIL_${workspaceSlug}_${projectId}_${issueId}` : null,
|
||||
workspaceSlug && projectId && issueId
|
||||
? () => fetchIssue(workspaceSlug.toString(), projectId.toString(), issueId.toString())
|
||||
|
|
@ -41,7 +41,7 @@ const IssueDetailsPage = observer(() => {
|
|||
// derived values
|
||||
const issue = getIssueById(issueId?.toString() || "") || undefined;
|
||||
const project = (issue?.project_id && getProjectById(issue?.project_id)) || undefined;
|
||||
const issueLoader = !issue || isLoading ? true : false;
|
||||
const issueLoader = !issue || isFetchingIssueDetails ? true : false;
|
||||
const pageTitle = project && issue ? `${project?.identifier}-${issue?.sequence_id} ${issue?.name}` : undefined;
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue