File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
web/src/pages/Courts/CourtDetails Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,27 @@ const Description: React.FC = () => {
4242 ( ) => setCurrentTab ( TABS . findIndex ( ( { path } ) => path === currentPathName ) ) ,
4343 [ currentPathName ]
4444 ) ;
45+
46+ const filteredTabs = TABS . filter ( ( tab ) => {
47+ if ( tab . path === "skills" && ! policy ?. requiredSkills ) {
48+ return false ;
49+ }
50+ return true ;
51+ } ) ;
52+
4553 return (
4654 < Container >
4755 < StyledTabs
4856 currentValue = { currentTab }
49- items = { TABS }
57+ items = { filteredTabs }
5058 callback = { ( n : number ) => {
5159 setCurrentTab ( n ) ;
5260 navigate ( TABS [ n ] . path ) ;
5361 } }
5462 />
5563 < Routes >
5664 < Route path = "purpose" element = { formatMarkdown ( policy ?. description ) } />
57- < Route path = "skills" element = { < p > </ p > } />
65+ < Route path = "skills" element = { < p > { policy ?. requiredSkills } </ p > } />
5866 < Route path = "policy" element = { formatMarkdown ( policy ?. summary ) } />
5967 < Route path = "*" element = { < Navigate to = "purpose" /> } />
6068 </ Routes >
You can’t perform that action at this time.
0 commit comments