11import "reflect-metadata" ;
22import { container } from "tsyringe" ;
3- import { useEffect , useRef } from "react" ;
3+ import { useEffect , useRef , useState } from "react" ;
44import BounceLoader from "react-spinners/BounceLoader" ;
55
66import MonoLogo from "assets/monoLogo.svg" ;
7- import { BranchSelector , Statistics , TemporalFilter , ThemeSelector , VerticalClusterList } from "components" ;
7+ import { BranchSelector , Statistics , TemporalFilter , ThemeSelector , VerticalClusterList , FolderActivityFlow } from "components" ;
88import "./App.scss" ;
99import type IDEPort from "ide/IDEPort" ;
1010import { useAnalayzedData } from "hooks" ;
@@ -16,6 +16,7 @@ import { NetworkGraph } from "components/NetworkGraph";
1616
1717const App = ( ) => {
1818 const initRef = useRef < boolean > ( false ) ;
19+ const [ showFolderActivityFlowModal , setShowFolderActivityFlowModal ] = useState ( false ) ;
1920 const { handleChangeAnalyzedData } = useAnalayzedData ( ) ;
2021 const filteredData = useDataStore ( ( state ) => state . filteredData ) ;
2122 const { handleChangeBranchList } = useBranchStore ( ) ;
@@ -24,6 +25,14 @@ const App = () => {
2425 const { theme } = useThemeStore ( ) ;
2526 const ideAdapter = container . resolve < IDEPort > ( "IDEAdapter" ) ;
2627
28+ const handleOpenFolderActivityFlowModal = ( ) => {
29+ setShowFolderActivityFlowModal ( true ) ;
30+ } ;
31+
32+ const handleCloseFolderActivityFlowModal = ( ) => {
33+ setShowFolderActivityFlowModal ( false ) ;
34+ } ;
35+
2736 useEffect ( ( ) => {
2837 if ( initRef . current === false ) {
2938 const callbacks : IDESentEvents = {
@@ -61,6 +70,12 @@ const App = () => {
6170 < ThemeSelector />
6271 < BranchSelector />
6372 < RefreshButton />
73+ < button
74+ className = "folder-activity-flow-button"
75+ onClick = { handleOpenFolderActivityFlowModal }
76+ >
77+ Folder Activity Flow
78+ </ button >
6479 </ div >
6580 < div className = "top-container" >
6681 < TemporalFilter />
@@ -80,6 +95,27 @@ const App = () => {
8095 ) }
8196 < NetworkGraph />
8297 </ div >
98+
99+ { /* Folder Activity Flow Modal */ }
100+ { showFolderActivityFlowModal && (
101+ < div
102+ className = "folder-activity-flow-modal"
103+ onClick = { handleCloseFolderActivityFlowModal }
104+ >
105+ < div
106+ className = "folder-activity-flow-modal-content"
107+ onClick = { ( e ) => e . stopPropagation ( ) }
108+ >
109+ < button
110+ className = "folder-activity-flow-modal-close"
111+ onClick = { handleCloseFolderActivityFlowModal }
112+ >
113+ ×
114+ </ button >
115+ < FolderActivityFlow />
116+ </ div >
117+ </ div >
118+ ) }
83119 </ >
84120 ) ;
85121} ;
0 commit comments