Skip to content

Commit 89bb57f

Browse files
committed
[del] : navigateUp 함수 제거
1 parent cc5e94f commit 89bb57f

2 files changed

Lines changed: 1 addition & 32 deletions

File tree

packages/view/src/components/FolderActivityFlow/ReleaseVisualization.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const renderReleaseVisualization = ({
5858
const activeFolderPaths = Array.from(new Set(releaseContributorActivities.map((a) => a.folderPath)));
5959
const filteredFolderPaths = releaseTopFolderPaths.filter((path) => activeFolderPaths.includes(path));
6060

61-
const chartWidth = (svg.node()?.parentElement?.clientWidth || DIMENSIONS.width) - 100;
61+
const chartWidth = Number(svg.attr("width"));
6262

6363
const xScale = d3
6464
.scaleBand()

packages/view/src/components/FolderActivityFlow/useFolderNavigation.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,6 @@ export function useFolderNavigation(totalData: ClusterNode[]) {
3636
[totalData]
3737
);
3838

39-
/**
40-
* Navigate up to parent folder
41-
*/
42-
const navigateUp = useCallback(() => {
43-
if (currentPath === "") {
44-
return;
45-
}
46-
47-
const parentPath = currentPath.includes("/") ? currentPath.substring(0, currentPath.lastIndexOf("/")) : "";
48-
49-
if (parentPath === "") {
50-
setCurrentPath("");
51-
setFolderDepth(1);
52-
53-
const rootResult = getRootFolders(totalData);
54-
55-
setReleaseTopFolderPaths(rootResult.folders as string[]);
56-
if (rootResult.releaseGroups) {
57-
setReleaseGroups(rootResult.releaseGroups);
58-
}
59-
} else {
60-
setCurrentPath(parentPath);
61-
setFolderDepth((prev) => Math.max(1, prev - 1));
62-
63-
const subFolders = getReleaseSubFolders(totalData, parentPath);
64-
65-
setReleaseTopFolderPaths(subFolders as string[]);
66-
}
67-
}, [currentPath, totalData]);
68-
6939
/**
7040
* Navigate to breadcrumb by index
7141
*/
@@ -137,7 +107,6 @@ export function useFolderNavigation(totalData: ClusterNode[]) {
137107

138108
// Actions
139109
navigateToFolder,
140-
navigateUp,
141110
navigateToBreadcrumb,
142111
initializeRootFolders,
143112
getBreadcrumbs,

0 commit comments

Comments
 (0)