chore: typo
This commit is contained in:
parent
b701dd6e1b
commit
324eee23cb
|
|
@ -67,7 +67,7 @@ const parseRouteParams = (params: Params<any>, search: URLSearchParams): BizRout
|
|||
}
|
||||
}
|
||||
|
||||
export const useRouteParms = () => {
|
||||
export const useRouteParams = () => {
|
||||
const params = useParams()
|
||||
const [search] = useSearchParams()
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useDebounceCallback } from "usehooks-ts"
|
|||
|
||||
import { useGeneralSettingKey } from "~/atoms/settings/general"
|
||||
import { views } from "~/constants"
|
||||
import { useRouteParamsSelector, useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams,useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
|
||||
import { useAuthQuery } from "~/hooks/common"
|
||||
import { entries, useEntries } from "~/queries/entries"
|
||||
import { entryActions, useEntryIdsByFeedIdOrView } from "~/store/entry"
|
||||
|
|
@ -56,7 +56,7 @@ export const useEntriesByView = ({
|
|||
onReset?: () => void
|
||||
isArchived?: boolean
|
||||
}) => {
|
||||
const routeParams = useRouteParms()
|
||||
const routeParams = useRouteParams()
|
||||
const unreadOnly = useGeneralSettingKey("unreadOnly")
|
||||
|
||||
const { feedId, view, isAllFeeds, isCollection } = routeParams
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useCallback } from "react"
|
||||
|
||||
import { useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams } from "~/hooks/biz/useRouteParams"
|
||||
import { subscriptionActions } from "~/store/subscription"
|
||||
import { useFolderFeedsByFeedId } from "~/store/subscription/hooks"
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ export interface MarkAllFilter {
|
|||
endTime: number
|
||||
}
|
||||
export const useMarkAllByRoute = (filter?: MarkAllFilter) => {
|
||||
const routerParams = useRouteParms()
|
||||
const routerParams = useRouteParams()
|
||||
const { feedId, view } = routerParams
|
||||
const folderIds = useFolderFeedsByFeedId({
|
||||
feedId,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { ReactVirtuosoItemPlaceholder } from "~/components/ui/placeholder"
|
|||
import { ScrollArea } from "~/components/ui/scroll-area"
|
||||
import { FEED_COLLECTION_LIST, ROUTE_FEED_PENDING, views } from "~/constants"
|
||||
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
|
||||
import { useRouteParamsSelector, useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams, useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
|
||||
import { useTitle, useTypeScriptHappyCallback } from "~/hooks/common"
|
||||
import { FeedViewType } from "~/lib/enum"
|
||||
import { cn, isBizId } from "~/lib/utils"
|
||||
|
|
@ -62,7 +62,7 @@ function EntryColumnImpl() {
|
|||
feedId: routeFeedId,
|
||||
isPendingEntry,
|
||||
isCollection,
|
||||
} = useRouteParms()
|
||||
} = useRouteParams()
|
||||
const activeEntry = useEntry(activeEntryId)
|
||||
const feedTitle = useFeedByIdSelector(routeFeedId, (feed) => feed?.title)
|
||||
useTitle(feedTitle)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { DividerVertical } from "~/components/ui/divider"
|
|||
import { EllipsisHorizontalTextWithTooltip } from "~/components/ui/typography"
|
||||
import { FEED_COLLECTION_LIST, ROUTE_ENTRY_PENDING, views } from "~/constants"
|
||||
import { shortcuts } from "~/constants/shortcuts"
|
||||
import { useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams } from "~/hooks/biz/useRouteParams"
|
||||
import { useIsOnline } from "~/hooks/common"
|
||||
import { FeedViewType } from "~/lib/enum"
|
||||
import { cn, getOS, isBizId } from "~/lib/utils"
|
||||
|
|
@ -28,7 +28,7 @@ export const EntryListHeader: FC<{
|
|||
isRefreshing: boolean
|
||||
hasUpdate: boolean
|
||||
}> = ({ totalCount, refetch, isRefreshing, hasUpdate }) => {
|
||||
const routerParams = useRouteParms()
|
||||
const routerParams = useRouteParams()
|
||||
const { t } = useTranslation()
|
||||
|
||||
const unreadOnly = useGeneralSettingKey("unreadOnly")
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import { UserAvatar } from "~/components/user-button"
|
|||
import { isWebBuild, ROUTE_FEED_PENDING } from "~/constants"
|
||||
import { shortcuts } from "~/constants/shortcuts"
|
||||
import { useEntryReadabilityToggle } from "~/hooks/biz/useEntryActions"
|
||||
import { useRouteParamsSelector, useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams,useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
|
||||
import { useAuthQuery, useTitle } from "~/hooks/common"
|
||||
import { stopPropagation } from "~/lib/dom"
|
||||
import { FeedViewType } from "~/lib/enum"
|
||||
|
|
@ -65,7 +65,7 @@ const safeUrl = (url: string, baseUrl: string) => {
|
|||
|
||||
export const EntryContent = ({ entryId }: { entryId: ActiveEntryId }) => {
|
||||
const title = useFeedHeaderTitle()
|
||||
const { feedId, view } = useRouteParms()
|
||||
const { feedId, view } = useRouteParams()
|
||||
|
||||
useTitle(title)
|
||||
if (!entryId) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { Outlet } from "react-router-dom"
|
|||
import { getUISettings, setUISetting } from "~/atoms/settings/ui"
|
||||
import { PanelSplitter } from "~/components/ui/divider"
|
||||
import { views } from "~/constants"
|
||||
import { useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams } from "~/hooks/biz/useRouteParams"
|
||||
import { cn, isSafari } from "~/lib/utils"
|
||||
import { EntryColumn } from "~/modules/entry-column"
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ export function Component() {
|
|||
// Memo this initial value to avoid re-render
|
||||
|
||||
const entryColWidth = useMemo(() => getUISettings().entryColWidth, [])
|
||||
const { view } = useRouteParms()
|
||||
const { view } = useRouteParams()
|
||||
const inWideMode = view ? views[view].wideMode : false
|
||||
const { position, separatorProps, isDragging, separatorCursor } = useResizable({
|
||||
axis: "x",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"
|
|||
import { useShallow } from "zustand/react/shallow"
|
||||
|
||||
import { FEED_COLLECTION_LIST, ROUTE_FEED_IN_FOLDER, ROUTE_FEED_PENDING, views } from "~/constants"
|
||||
import { useRouteParms } from "~/hooks/biz/useRouteParams"
|
||||
import { useRouteParams } from "~/hooks/biz/useRouteParams"
|
||||
import type { FeedModel } from "~/models"
|
||||
|
||||
import { getSubscriptionByFeedId } from "../subscription"
|
||||
|
|
@ -35,7 +35,7 @@ export const useFeedByIdSelector = <T>(
|
|||
export const useFeedHeaderTitle = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { feedId: currentFeedId, view } = useRouteParms()
|
||||
const { feedId: currentFeedId, view } = useRouteParams()
|
||||
|
||||
const feedTitle = useFeedByIdSelector(currentFeedId, (feed) => feed.title)
|
||||
const subscriptionTitle = useMemo(
|
||||
|
|
|
|||
Loading…
Reference in New Issue