mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-23 00:38:39 +02:00
chore: remove me from global handler
This commit is contained in:
@@ -5,7 +5,6 @@ import { useAtom } from "jotai"
|
|||||||
import { usePageActions } from "~/hooks/actions/use-page-actions"
|
import { usePageActions } from "~/hooks/actions/use-page-actions"
|
||||||
import { useAuth } from "@clerk/tanstack-start"
|
import { useAuth } from "@clerk/tanstack-start"
|
||||||
import { useNavigate } from "@tanstack/react-router"
|
import { useNavigate } from "@tanstack/react-router"
|
||||||
import queryString from "query-string"
|
|
||||||
import { commandPaletteOpenAtom } from "~/store/any-store"
|
import { commandPaletteOpenAtom } from "~/store/any-store"
|
||||||
import { isModKey, isServer } from "@shared/utils"
|
import { isModKey, isServer } from "@shared/utils"
|
||||||
|
|
||||||
@@ -57,9 +56,7 @@ export function KeyboardHandlerContent() {
|
|||||||
const route = SEQUENCES[sequenceStr]
|
const route = SEQUENCES[sequenceStr]
|
||||||
|
|
||||||
if (route) {
|
if (route) {
|
||||||
navigate({
|
navigate({ to: route })
|
||||||
to: route,
|
|
||||||
})
|
|
||||||
resetSequence()
|
resetSequence()
|
||||||
}
|
}
|
||||||
}, [sequence, navigate, resetSequence])
|
}, [sequence, navigate, resetSequence])
|
||||||
@@ -71,7 +68,8 @@ export function KeyboardHandlerContent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: `/links?${queryString.stringify({ create: true })}`,
|
to: "/links",
|
||||||
|
search: { create: true },
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
[navigate],
|
[navigate],
|
||||||
@@ -83,17 +81,9 @@ export function KeyboardHandlerContent() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!me || me._type === "Anonymous") {
|
newPage()
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const page = newPage(me)
|
|
||||||
|
|
||||||
navigate({
|
|
||||||
to: `/pages/${page.id}`,
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
[me, newPage, navigate],
|
[newPage],
|
||||||
)
|
)
|
||||||
|
|
||||||
useKeyDown(
|
useKeyDown(
|
||||||
|
|||||||
Reference in New Issue
Block a user