@@ -3,7 +3,7 @@ import { TableCellLocation, TableFormView } from 'mobx-lark';
33import { observer } from 'mobx-react' ;
44import { cache , compose , errorLogger } from 'next-ssr-middleware' ;
55import { FC , useContext , useMemo , useState } from 'react' ;
6- import { Breadcrumb , Button , Card , Col , Container , Modal , Ratio , Row } from 'react-bootstrap' ;
6+ import { Breadcrumb , Button , Card , Col , Container , Modal , Nav , Ratio , Row } from 'react-bootstrap' ;
77
88import { CommentBox } from '../../../../components/Activity/CommentBox' ;
99import {
@@ -46,15 +46,18 @@ export const getServerSideProps = compose<Record<'id' | 'tid', string>>(
4646 return { notFound : true } ;
4747
4848 const project = await new ProjectModel ( appId , tableIdMap . Project ) . getOne ( params ! . tid ) ;
49+ const projectName = firstTextOf ( project . name ) ;
50+
51+ if ( ! projectName ) return { notFound : true } ;
4952
5053 // Get approved members for this project
5154 const [ members , products ] = await Promise . all ( [
5255 new MemberModel ( appId , tableIdMap . Member ) . getAll ( {
53- project : project . name as string ,
56+ project : projectName ,
5457 status : 'approved' ,
5558 } ) ,
5659 new ProductModel ( appId , tableIdMap . Product ) . getAll ( {
57- project : project . name as string ,
60+ project : projectName ,
5861 } ) ,
5962 ] ) ;
6063 return {
@@ -193,13 +196,15 @@ const ProjectPage: FC<ProjectPageProps> = observer(
193196 ) ) }
194197 </ Breadcrumb >
195198
196- < nav className = { styles . heroNav } aria-label = { displayTitle } >
199+ < Nav as = "ul" className = { ` ${ styles . heroNav } list-unstyled` } aria-label = { displayTitle } >
197200 { navigation . map ( ( { href, label } ) => (
198- < a key = { `${ href } -${ label } ` } className = { styles . heroNavLink } href = { href } >
199- { label }
200- </ a >
201+ < Nav . Item as = "li" key = { `${ href } -${ label } ` } >
202+ < Nav . Link className = { styles . heroNavLink } href = { href } >
203+ { label }
204+ </ Nav . Link >
205+ </ Nav . Item >
201206 ) ) }
202- </ nav >
207+ </ Nav >
203208
204209 < div className = { styles . heroTagRow } >
205210 < span className = { styles . heroEyebrow } >
0 commit comments