11import { Link } from "react-router-dom" ;
22import { Tabs } from "@canonical/react-components" ;
33
4+ import type { ElementType } from "react" ;
5+
46type Props = {
57 activeTab : string ;
68 snapName : string | undefined ;
@@ -15,37 +17,37 @@ function SectionNav({ activeTab, snapName }: Props): React.JSX.Element {
1517 label : "Listing" ,
1618 active : activeTab === "listing" || ! activeTab ,
1719 to : `/${ snapName } /listing` ,
18- component : Link ,
20+ component : Link as ElementType ,
1921 } ,
2022 {
2123 label : "Builds" ,
2224 active : activeTab === "builds" ,
2325 to : `/${ snapName } /builds` ,
24- component : Link ,
26+ component : Link as ElementType ,
2527 } ,
2628 {
2729 label : "Releases" ,
2830 active : activeTab === "releases" ,
2931 to : `/${ snapName } /releases` ,
30- component : Link ,
32+ component : Link as ElementType ,
3133 } ,
3234 {
3335 label : "Metrics" ,
3436 active : activeTab === "metrics" ,
3537 to : `/${ snapName } /metrics` ,
36- component : Link ,
38+ component : Link as ElementType ,
3739 } ,
3840 {
3941 label : "Publicise" ,
4042 active : activeTab === "publicise" ,
4143 to : `/${ snapName } /publicise` ,
42- component : Link ,
44+ component : Link as ElementType ,
4345 } ,
4446 {
4547 label : "Settings" ,
4648 active : activeTab === "settings" ,
4749 to : `/${ snapName } /settings` ,
48- component : Link ,
50+ component : Link as ElementType ,
4951 } ,
5052 ] }
5153 />
0 commit comments