Skip to content

Commit

Permalink
Search points to the right direction again
Browse files Browse the repository at this point in the history
  • Loading branch information
domesticated-raptor authored and wrdhub committed Aug 15, 2024
1 parent 4ac3d57 commit b61febb
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/calendar-app/gui/CalendarBottomNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ import { locator } from "../../common/api/main/CommonLocator.js"
type Attrs = void
const fontSize = size.font_size_small

function getHrefForSearch(): string {
const route = m.route.get()
if (route.startsWith(SEARCH_PREFIX)) {
return route
} else {
return "/search/calendar"
}
}

export class CalendarBottomNav implements Component<Attrs> {
view(vnode: Vnode<Attrs>): Children {
// Using bottom-nav class too to match it inside media queries like @print, otherwise it's not matched
Expand All @@ -26,7 +17,7 @@ export class CalendarBottomNav implements Component<Attrs> {
? m(NavButton, {
label: "search_label",
icon: () => BootIcons.Search,
href: () => getHrefForSearch(),
href: "/search/calendar",
isSelectedPrefix: SEARCH_PREFIX,
vertical: true,
fontSize,
Expand Down

0 comments on commit b61febb

Please sign in to comment.