@@ -113,51 +113,51 @@ let make = (~docsIndex, ~currentLocation) => {
113113 </Text >
114114 </SpacedView >
115115 </div >
116- {{section . data
117- -> List . map(((title , link)) => {
118- let fulllink = "en/" ++ link ;
119- let isActive =
120- currentLocation ## pathname
121- |> Js . String . startsWith(fulllink ++ "index.html" ) ;
122- ! (link |> Js . String . startsWith("docs/apis/" ))
123- && ! ( link |> Js . String . startsWith("docs/components /" ))
124- || (
125- link
126- |> Js . String . startsWith( "docs/apis/" )
127- || link
128- |> Js . String . startsWith( "docs/components/" )
129- )
130- && docsIndex -> Array . some(path =>
131- link == "docs/" ++ path ++ "/"
132- )
133- ? < ViewLink
134- key = title
135- href = { Consts . baseUrl ++ "/" ++ fulllink}
136- style = { Style . arrayOption( [|
137- Some (styles## link) ,
138- isActive ? Some (styles ## linkActive) : None ,
139- |] )} >
140- < SpacedView horizontal = XS vertical = XXS >
141- < Text
142- style = { Style . arrayOption( [|
143- Some (styles## linkText) ,
144- isActive ? Some (styles ## linkTextActive) : None ,
145- |] )}>
146- title -> React . string
147- </ Text >
148- </ SpacedView >
149- </ ViewLink >
150- : < SpacedView horizontal = XS vertical = XXS >
151- < Text
152- key = title
153- style = { Style . array( [|
154- styles## link ,
155- styles ## notlinkText ,
156- |] )}>
157- title -> React . string
158- </ Text >
159- </ SpacedView > ;
160- }) }
116+ {{
117+ section . data
118+ -> List . map(((title , link)) => {
119+ let fulllink = "en/" ++ link ;
120+ let isActive =
121+ currentLocation ## pathname
122+ |> Js . String . startsWith(fulllink ++ "index.html" ) ;
123+ let isApi = link |> Js . String . startsWith("docs/apis /" );
124+ let isComponent =
125+ link |> Js . String . startsWith( "docs/components/" ) ;
126+ ! isApi
127+ && ! isComponent
128+ || (isApi || isComponent )
129+ && docsIndex -> Array . some(path =>
130+ link == "docs/" ++ path ++ "/"
131+ )
132+ ? < ViewLink
133+ key = title
134+ href = { Consts . baseUrl ++ "/" ++ fulllink}
135+ style = { Style . arrayOption( [|
136+ Some (styles ## link) ,
137+ isActive ? Some (styles## linkActive) : None ,
138+ |] )}>
139+ < SpacedView horizontal = XS vertical = XXS >
140+ < Text
141+ style = { Style . arrayOption( [|
142+ Some (styles ## linkText) ,
143+ isActive ? Some (styles## linkTextActive) : None ,
144+ |] )}>
145+ title -> React . string
146+ </ Text >
147+ </ SpacedView >
148+ </ ViewLink >
149+ : < SpacedView horizontal = XS vertical = XXS >
150+ < Text
151+ key = title
152+ style = { Style . array( [|
153+ styles ## link ,
154+ styles## notlinkText ,
155+ |] )}>
156+ title -> React . string
157+ </ Text >
158+ </ SpacedView > ;
159+ }) ;
160+ }
161161 -> List . toArray
162162 -> React . array}
163163 <Spacer size= Spacer . S />
0 commit comments