mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
modal search param for copied issue links
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useEffect, useMemo, useRef } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { IssueDetailPane } from "@/components/issue-detail-pane";
|
||||
import { IssueModal } from "@/components/issue-modal";
|
||||
import { IssuesTable } from "@/components/issues-table";
|
||||
import { useSelection } from "@/components/selection-provider";
|
||||
import TopBar from "@/components/top-bar";
|
||||
@@ -35,6 +36,9 @@ export default function Issues() {
|
||||
};
|
||||
}, [location.search]);
|
||||
|
||||
const showIssueModal =
|
||||
new URLSearchParams(window.location.search).get("modal")?.trim().toLowerCase() === "true";
|
||||
|
||||
const { data: organisationsData = [] } = useOrganisations();
|
||||
const { data: projectsData = [] } = useProjects(selectedOrganisationId);
|
||||
const { data: issuesData = [], isFetched: issuesFetched } = useIssues(selectedProjectId);
|
||||
@@ -170,7 +174,7 @@ export default function Issues() {
|
||||
</div>
|
||||
</ResizablePanel>
|
||||
|
||||
{selectedIssue && (
|
||||
{selectedIssue && !showIssueModal && (
|
||||
<>
|
||||
<ResizableSeparator />
|
||||
<ResizablePanel id={"right"} defaultSize={"30%"} minSize={363} maxSize={"60%"}>
|
||||
@@ -182,6 +186,18 @@ export default function Issues() {
|
||||
)}
|
||||
</ResizablePanelGroup>
|
||||
)}
|
||||
|
||||
{selectedIssue && showIssueModal && (
|
||||
<IssueModal
|
||||
issueData={selectedIssue}
|
||||
open={true}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
selectIssue(null);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user