Skip to content

Commit

Permalink
chore: cleanup code
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Nov 17, 2024
1 parent f9a6772 commit 7623e30
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 377 deletions.
298 changes: 0 additions & 298 deletions apps/renderer/src/components/ui/kbd/Kbd.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/renderer/src/hooks/biz/useSubscriptionActions.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Kbd } from "@follow/components/ui/kbd/Kbd.js"
import { useMutation } from "@tanstack/react-query"
import { useHotkeys } from "react-hotkeys-hook"
import { Trans, useTranslation } from "react-i18next"
import { toast } from "sonner"

import { Kbd } from "~/components/ui/kbd/Kbd"
import { HotKeyScopeMap } from "~/constants"
import { apiClient } from "~/lib/api-fetch"
import { subscription as subscriptionQuery } from "~/queries/subscriptions"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useViewport } from "@follow/components/hooks/useViewport.js"
import { ActionButton, Button, IconButton } from "@follow/components/ui/button/index.js"
import { Kbd, KbdCombined } from "@follow/components/ui/kbd/Kbd.js"
import { RootPortal } from "@follow/components/ui/portal/index.jsx"
import { useCountdown } from "@follow/hooks"
import { cn, getOS } from "@follow/utils/utils"
Expand All @@ -11,7 +12,6 @@ import { Trans, useTranslation } from "react-i18next"
import { toast } from "sonner"
import { useOnClickOutside } from "usehooks-ts"

import { Kbd, KbdCombined } from "~/components/ui/kbd/Kbd"
import { HotKeyScopeMap, isElectronBuild } from "~/constants"
import { shortcuts } from "~/constants/shortcuts"
import { useI18n } from "~/hooks/common"
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/modules/modal/shortcuts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MotionButtonBase } from "@follow/components/ui/button/index.js"
import { KbdCombined } from "@follow/components/ui/kbd/Kbd.js"
import { ScrollArea } from "@follow/components/ui/scroll-area/index.js"
import { cn } from "@follow/utils/utils"
import clsx from "clsx"
Expand All @@ -7,7 +8,6 @@ import { useCallback, useEffect } from "react"
import { useTranslation } from "react-i18next"

import { useUISettingKey } from "~/atoms/settings/ui"
import { KbdCombined } from "~/components/ui/kbd/Kbd"
import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { useCurrentModal, useModalStack } from "~/components/ui/modal/stacked/hooks"
import { shortcuts, shortcutsType } from "~/constants/shortcuts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Logo } from "@follow/components/icons/logo.jsx"
import { Button } from "@follow/components/ui/button/index.js"
import { Kbd } from "@follow/components/ui/kbd/Kbd.js"
import clsx from "clsx"
import { AnimatePresence, m } from "framer-motion"
import type { ComponentProps, FunctionComponentElement } from "react"
import { createElement, useCallback, useMemo, useState } from "react"
import { Trans, useTranslation } from "react-i18next"

import { useGeneralSettingKey } from "~/atoms/settings/general"
import { Kbd } from "~/components/ui/kbd/Kbd"
import { mountLottie } from "~/components/ui/lottie-container"
import { Markdown } from "~/components/ui/markdown/Markdown"
import { useI18n } from "~/hooks/common"
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/pages/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { DragEndEvent } from "@dnd-kit/core"
import { DndContext, PointerSensor, pointerWithin, useSensor, useSensors } from "@dnd-kit/core"
import { useViewport } from "@follow/components/hooks/useViewport.js"
import { PanelSplitter } from "@follow/components/ui/divider/index.js"
import { Kbd } from "@follow/components/ui/kbd/Kbd.js"
import { RootPortal } from "@follow/components/ui/portal/index.jsx"
import type { FeedViewType } from "@follow/constants"
import { IN_ELECTRON } from "@follow/shared/constants"
Expand Down Expand Up @@ -30,7 +31,6 @@ import {
import { useLoginModalShow, useWhoami } from "~/atoms/user"
import { AppErrorBoundary } from "~/components/common/AppErrorBoundary"
import { ErrorComponentType } from "~/components/errors/enum"
import { Kbd } from "~/components/ui/kbd/Kbd"
import { PlainModal } from "~/components/ui/modal/stacked/custom-modal"
import { DeclarativeModal } from "~/components/ui/modal/stacked/declarative-modal"
import { HotKeyScopeMap, isDev, isWebBuild } from "~/constants"
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/pages/settings/(settings)/shortcuts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { KbdCombined } from "@follow/components/ui/kbd/Kbd.js"
import { cn } from "@follow/utils/utils"
import { useTranslation } from "react-i18next"

import { KbdCombined } from "~/components/ui/kbd/Kbd"
import { shortcuts, shortcutsType } from "~/constants/shortcuts"
import { SettingsTitle } from "~/modules/settings/title"
import { defineSettingPageData } from "~/modules/settings/utils"
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/providers/context-menu-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { KbdCombined } from "@follow/components/ui/kbd/Kbd.js"
import { nextFrame, preventDefault } from "@follow/utils/dom"
import { cn } from "@follow/utils/utils"
import { Fragment, memo, useCallback, useEffect, useRef } from "react"
Expand All @@ -17,7 +18,6 @@ import {
ContextMenuSubTrigger,
ContextMenuTrigger,
} from "~/components/ui/context-menu"
import { KbdCombined } from "~/components/ui/kbd/Kbd"
import { HotKeyScopeMap } from "~/constants"
import { useSwitchHotKeyScope } from "~/hooks/common"

Expand Down
Loading

0 comments on commit 7623e30

Please sign in to comment.