11---
2+ // src/components/handbook/PageNav.astro
23import ArticleNavigation from ' @components/ArticleNavigation.astro' ;
4+ import LastUpdated from ' @components/handbook/LastUpdated.astro' ;
35import type { SidebarItems } from ' @/src/types/common' ;
46
57const {
68 currentArticleId,
79 items,
10+ lastUpdated,
811 class : className,
912} = Astro .props as {
1013 currentArticleId: string ;
1114 class? : string ;
1215 items: SidebarItems [];
16+ lastUpdated? : Date ;
1317};
1418
1519const handbookItems: Array <{ id: string ; data: { title: string } }> = [];
@@ -32,20 +36,25 @@ const nextArticle =
3236 currentIndex < handbookItems .length - 1 ? handbookItems [currentIndex + 1 ] : undefined ;
3337---
3438
35- <ArticleNavigation
36- previousArticle ={ previousArticle
37- ? {
38- id: previousArticle .id ,
39- title: previousArticle .data .title ,
40- url: ` /handbook/${previousArticle .id }/ ` ,
41- }
42- : undefined }
43- nextArticle ={ nextArticle
44- ? {
45- id: nextArticle .id ,
46- title: nextArticle .data .title ,
47- url: ` /handbook/${nextArticle .id }/ ` ,
48- }
49- : undefined }
50- class ={ className }
51- />
39+ { /* Last Updated */ }
40+ <footer id =" footer-article" class =" article-footer" >
41+ { lastUpdated && <LastUpdated date = { lastUpdated } />}
42+
43+ <ArticleNavigation
44+ previousArticle ={ previousArticle
45+ ? {
46+ id: previousArticle .id ,
47+ title: previousArticle .data .title ,
48+ url: ` /handbook/${previousArticle .id }/ ` ,
49+ }
50+ : undefined }
51+ nextArticle ={ nextArticle
52+ ? {
53+ id: nextArticle .id ,
54+ title: nextArticle .data .title ,
55+ url: ` /handbook/${nextArticle .id }/ ` ,
56+ }
57+ : undefined }
58+ class ={ className }
59+ />
60+ </footer >
0 commit comments