@@ -11,13 +11,32 @@ import platformSelectorStyles from './platformSelector/style.module.scss';
1111import { PlatformSelector } from './platformSelector' ;
1212
1313const productSections = [
14- { label : 'Sentry' , href : '/product/sentry/' } ,
15- { label : 'Sentry Prevent' , href : '/product/sentry-prevent/' } ,
16- { label : 'Seer' , href : '/product/seer/' } ,
14+ { label : 'Sentry Basics' , href : '/product/sentry-basics/' } ,
15+ { label : 'AI in Sentry' , href : '/product/ai-in-sentry/' } ,
16+ { label : 'Insights' , href : '/product/insights/' } ,
17+ { label : 'User Feedback' , href : '/product/user-feedback/' } ,
18+ { label : 'Uptime Monitoring' , href : '/product/uptime-monitoring/' } ,
19+ { label : 'Dashboards' , href : '/product/dashboards/' } ,
20+ { label : 'Projects' , href : '/product/projects/' } ,
21+ { label : 'Explore' , href : '/product/explore/' } ,
22+ { label : 'Issues' , href : '/product/issues/' } ,
23+ { label : 'Alerts' , href : '/product/alerts/' } ,
24+ { label : 'Crons' , href : '/product/crons/' } ,
25+ { label : 'Releases' , href : '/product/releases/' } ,
26+ { label : 'Relay' , href : '/product/relay/' } ,
27+ { label : 'Sentry MCP' , href : '/product/sentry-mcp/' } ,
28+ { label : 'Sentry Toolbar' , href : '/product/sentry-toolbar/' } ,
29+ { label : 'Stats' , href : '/product/stats/' } ,
30+ { label : 'Codecov' , href : '/product/codecov/' } ,
31+ { label : 'Onboarding' , href : '/product/onboarding/' } ,
1732] ;
1833
1934const mainSections = [
20- { label : 'Products' , href : '/product/' } ,
35+ {
36+ label : 'Products' ,
37+ href : '/product/' ,
38+ dropdown : productSections ,
39+ } ,
2140 { label : 'SDKs' , href : '/platforms/' } ,
2241 {
2342 label : 'Concepts & Reference' ,
@@ -240,16 +259,41 @@ export default function TopNavClient({platforms}: {platforms: Platform[]}) {
240259 { mainSections . map ( section => (
241260 < li key = { section . href } className = "list-none relative" >
242261 { section . label === 'Products' ? (
243- < Link
244- href = { section . href }
245- className = { `text-[var(--gray-12)] transition-colors duration-150 inline-block py-2 px-1 rounded-t-md text-[0.875rem] font-normal ${
246- pathname ?. startsWith ( section . href )
247- ? 'border-b-2 border-[var(--accent-purple)]'
248- : 'hover:text-[var(--accent)]'
249- } `}
250- >
251- { section . label }
252- </ Link >
262+ < div style = { { display : 'inline-block' } } >
263+ < button
264+ ref = { productsBtnRef }
265+ className = { `text-[var(--gray-12)] transition-colors duration-150 inline-block py-2 px-1 rounded-t-md flex items-center gap-1 text-[0.875rem] font-normal ${
266+ productsDropdownOpen || pathname ?. startsWith ( section . href )
267+ ? 'border-b-2 border-[var(--accent-purple)]'
268+ : 'hover:text-[var(--accent)]'
269+ } `}
270+ onClick = { ( ) => {
271+ setProductsDropdownOpen ( v => ! v ) ;
272+ setConceptsDropdownOpen ( false ) ;
273+ setAdminDropdownOpen ( false ) ;
274+ } }
275+ aria-haspopup = "true"
276+ aria-expanded = { productsDropdownOpen }
277+ >
278+ { section . label }
279+ < svg
280+ className = { `ml-1 transition-transform duration-150 ${ productsDropdownOpen ? 'rotate-180' : '' } ` }
281+ width = "16"
282+ height = "16"
283+ viewBox = "0 0 16 16"
284+ fill = "none"
285+ xmlns = "http://www.w3.org/2000/svg"
286+ >
287+ < path
288+ d = "M4 6L8 10L12 6"
289+ stroke = "currentColor"
290+ strokeWidth = "1.5"
291+ strokeLinecap = "round"
292+ strokeLinejoin = "round"
293+ />
294+ </ svg >
295+ </ button >
296+ </ div >
253297 ) : section . label === 'SDKs' ? (
254298 < div style = { { display : 'inline-block' } } >
255299 < button
0 commit comments