File tree Expand file tree Collapse file tree 1 file changed +13
-42
lines changed
apps/docs/src/components/override-components Expand file tree Collapse file tree 1 file changed +13
-42
lines changed Original file line number Diff line number Diff line change @@ -6,53 +6,24 @@ import { Icon } from "@astrojs/starlight/components";
66import { markdownify } from " @/lib/utils/textConverter" ;
77
88const footer = menu .footer ;
9+ const footerSections = [footer .community , footer .help_links , footer .company ].filter (Boolean );
910---
1011
1112<footer >
1213 <div class =" container" >
1314 <div class =" top-footer" >
14- {
15- footer .community && (
16- <div >
17- <h4 >{ footer .community .title } </h4 >
18- <ul >
19- { footer .community ?.links .map ((link : any ) => (
20- <li >
21- <a href = { link .url } >{ link .name } </a >
22- </li >
23- ))}
24- </ul >
25- </div >
26- )
27- }
28- {
29- footer .help_links && (
30- <div >
31- <h4 >{ footer .help_links .title } </h4 >
32- <ul >
33- { footer .help_links ?.links .map ((link : any ) => (
34- <li >
35- <a href = { link .url } >{ link .name } </a >
36- </li >
37- ))}
38- </ul >
39- </div >
40- )
41- }
42- {
43- footer .company && (
44- <div >
45- <h4 >{ footer .company .title } </h4 >
46- <ul >
47- { footer .company ?.links .map ((link : any ) => (
48- <li >
49- <a href = { link .url } >{ link .name } </a >
50- </li >
51- ))}
52- </ul >
53- </div >
54- )
55- }
15+ { footerSections .map ((section ) => (
16+ <div >
17+ <h4 >{ section .title } </h4 >
18+ <ul >
19+ { section .links .map ((link : any ) => (
20+ <li >
21+ <a href = { link .url } >{ link .name } </a >
22+ </li >
23+ ))}
24+ </ul >
25+ </div >
26+ ))}
5627
5728 {
5829 config ?.params ?.footer_contact ?.enable && (
You can’t perform that action at this time.
0 commit comments