@@ -13,11 +13,14 @@ import { useTabStore } from 'stores/TabStore';
1313import Button from 'components/atoms/common/Button' ;
1414import { BUTTON_TYPES } from 'constants/Common' ;
1515import GenerateFlowTestModal from '../modals/GenerateFlowTestModal' ;
16+ import useCanvasStore from 'stores/CanvasStore' ;
1617
1718const TabPanelHeader = ( ) => {
18- const focusTabId = useTabStore . getState ( ) . focusTabId ;
19- const tabs = useTabStore . getState ( ) . tabs ;
19+ const focusTabId = useTabStore ( ( state ) => state . focusTabId ) ;
20+ const tabs = useTabStore ( ( state ) => state . tabs ) ;
2021 const focusTab = tabs . find ( ( t ) => t . id === focusTabId ) ;
22+ const graphRunLogs = useCanvasStore ( ( state ) => state . logs ) ;
23+ console . log ( 'graph logs: ' , graphRunLogs ) ;
2124
2225 const [ generateFlowTestModalOpen , setGenerateFlowTestModalOpen ] = useState ( false ) ;
2326
@@ -30,35 +33,43 @@ const TabPanelHeader = () => {
3033 < div className = 'flex items-center justify-between pl-4 gap-x-4' >
3134 < SaveFlowModal tab = { focusTab } />
3235 { /* ToDo: Create our own side sheet component */ }
33- < div className = 'drawer drawer-end' >
34- < input id = 'graph-logs-side-sheet' type = 'checkbox' className = 'drawer-toggle' />
35- < div className = 'cursor-pointer drawer-content' >
36- < Tippy content = 'Logs' placement = 'top' >
37- < label htmlFor = 'graph-logs-side-sheet' >
38- < DocumentTextIcon className = 'w-5 h-5' />
39- </ label >
40- </ Tippy >
41- </ div >
36+ { graphRunLogs . length != 0 ? (
37+ < div className = 'drawer drawer-end' >
38+ < input id = 'graph-logs-side-sheet' type = 'checkbox' className = 'drawer-toggle' />
39+ < div className = 'cursor-pointer drawer-content' >
40+ < Tippy content = 'Logs' placement = 'top' >
41+ < label htmlFor = 'graph-logs-side-sheet' >
42+ < DocumentTextIcon className = 'w-5 h-5' />
43+ </ label >
44+ </ Tippy >
45+ </ div >
4246
43- < div className = 'z-50 drawer-side' >
44- < label htmlFor = 'graph-logs-side-sheet' aria-label = 'close sidebar' className = 'drawer-overlay' > </ label >
45- < ul className = 'min-h-full p-4 menu w-80 bg-base-200 text-base-content' >
46- < li >
47- < a > Sidebar Item 1</ a >
48- </ li >
49- < li >
50- < a > Sidebar Item 2</ a >
51- </ li >
52- </ ul >
47+ < div className = 'z-50 drawer-side' >
48+ < label
49+ htmlFor = 'graph-logs-side-sheet'
50+ aria-label = 'close sidebar'
51+ className = 'drawer-overlay'
52+ > </ label >
53+ < ul className = 'min-h-full p-4 menu w-80 bg-base-200 text-base-content' >
54+ { graphRunLogs . map ( ( item , index ) => (
55+ < li key = { index } >
56+ < div > { console . log ( item ) } </ div >
57+ < a > { item } </ a >
58+ </ li >
59+ ) ) }
60+ </ ul >
61+ </ div >
5362 </ div >
54- </ div >
63+ ) : (
64+ < > </ >
65+ ) }
5566 < button >
56- < Tippy content = 'Coming Soon!' placement = 'top' >
67+ < Tippy content = 'Import - Coming Soon!' placement = 'top' >
5768 < DocumentArrowDownIcon className = 'w-5 h-5 fill-neutral-200 text-neutral-400' />
5869 </ Tippy >
5970 </ button >
6071 < button >
61- < Tippy content = 'Coming Soon!' placement = 'top' >
72+ < Tippy content = 'Export - Coming Soon!' placement = 'top' >
6273 < DocumentArrowUpIcon className = 'w-5 h-5 fill-neutral-200 text-neutral-400' />
6374 </ Tippy >
6475 </ button >
0 commit comments