1- import { solidBaseConfig } from "virtual:solidbase/config" ;
21import { Popover } from "@kobalte/core/popover" ;
32import { createMemo , createSignal , For , Show } from "solid-js" ;
43import IconExpandUpDownLine from "~icons/ri/expand-up-down-line" ;
@@ -7,20 +6,19 @@ import {
76 getSolidBaseRouteFallbackOptions ,
87 type SolidBaseRouteOption ,
98} from "../../config/route-config.js" ;
9+ import { useRouteConfig } from "../utils.js" ;
1010import styles from "./VersionSelector.module.css" ;
1111
1212const VERSION_AXIS = "version" ;
1313
1414export default function VersionSelector ( ) {
1515 const [ open , setOpen ] = createSignal ( false ) ;
1616
17+ const config = useRouteConfig ( ) ;
18+
1719 const current = useSolidBaseRoute ( ) ;
1820 const options = createMemo ( ( ) =>
19- getSolidBaseRouteFallbackOptions (
20- solidBaseConfig . routes ,
21- VERSION_AXIS ,
22- current ( ) ,
23- ) ,
21+ getSolidBaseRouteFallbackOptions ( config ( ) . routes , VERSION_AXIS , current ( ) ) ,
2422 ) ;
2523 const currentOption = createMemo ( ( ) =>
2624 options ( ) . find ( ( option ) => option . name === current ( ) [ VERSION_AXIS ] ) ,
@@ -44,7 +42,7 @@ export default function VersionSelector() {
4442 >
4543 < Popover . Trigger
4644 class = { styles . trigger }
47- aria-label = "Change project "
45+ aria-label = "Change version "
4846 disabled = { options ( ) . length <= 1 }
4947 >
5048 < span class = { styles . label } > { getOptionLabel ( current ( ) ) } </ span >
0 commit comments