File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
components/LabeledIconButton Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11import { glob } from 'glob' ;
2+
3+
24import DocumentationPage from "@/components/DocumentationPage" ;
35
4- const RELATIVE_DOCS_PATH = '../../../docs' ;
6+
7+
8+ const RELATIVE_DOCS_PATH = '/docs' ;
59
610export default async function Page ( { params } : {
711 params : Promise < { slug : string [ ] } > ;
@@ -46,10 +50,12 @@ const importSlug = async (slug: string[]) => {
4650
4751 for ( const ext of EXTENSIONS ) {
4852 for ( const file of FILES ) {
49- const fullPath = `${ RELATIVE_DOCS_PATH } / ${ path } ${ file } .${ ext } ` ;
53+ const fullPath = `${ path } ${ file } .${ ext } ` ;
5054 try {
51- return await import ( fullPath ) ;
52- } catch ( e ) { }
55+ return await import ( `@/docs/${ fullPath } ` ) ;
56+ } catch ( e ) {
57+ console . error ( fullPath ) ;
58+ }
5359 }
5460 }
5561
Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ interface LabeledIconButtonProps extends IconButtonProps {
1111 * IconButton with a small label below it in a vertical layout.
1212 */
1313const LabeledIconButton = ( { label, href, ...props } : LabeledIconButtonProps ) => {
14+
1415 return (
1516 < Link href = { href } >
1617 < Box display = { "flex" } flexDirection = { "column" } alignItems = { "center" } >
1718 < IconButton { ...props } sx = { { ...props . sx , mb : - 1 } } >
1819 { props . children }
1920 </ IconButton >
20- < Typography variant = "caption" display = "block" textAlign = "center" >
21+ < Typography variant = "caption" display = "block" textAlign = "center" sx = { props . sx } >
2122 { label }
2223 </ Typography >
2324 </ Box >
You can’t perform that action at this time.
0 commit comments