diff --git a/src/pages/secondary/SettingsPage/index.tsx b/src/pages/secondary/SettingsPage/index.tsx
index 5fe461c9..0349e97b 100644
--- a/src/pages/secondary/SettingsPage/index.tsx
+++ b/src/pages/secondary/SettingsPage/index.tsx
@@ -1,159 +1,16 @@
-import AboutInfoDialog from '@/components/AboutInfoDialog'
-import Donation from '@/components/Donation'
+import Settings from '@/components/Settings'
import SecondaryPageLayout from '@/layouts/SecondaryPageLayout'
-import {
- toAppearanceSettings,
- toGeneralSettings,
- toPostSettings,
- toRelaySettings,
- toTranslation,
- toWallet
-} from '@/lib/link'
-import { cn } from '@/lib/utils'
-import { useSecondaryPage } from '@/PageManager'
-import { useNostr } from '@/providers/NostrProvider'
-import {
- Check,
- ChevronRight,
- Copy,
- Info,
- KeyRound,
- Languages,
- Palette,
- PencilLine,
- Server,
- Settings2,
- Wallet
-} from 'lucide-react'
-import { forwardRef, HTMLProps, useState } from 'react'
+import { forwardRef } from 'react'
import { useTranslation } from 'react-i18next'
const SettingsPage = forwardRef(({ index }: { index?: number }, ref) => {
const { t } = useTranslation()
- const { pubkey, nsec, ncryptsec } = useNostr()
- const { push } = useSecondaryPage()
- const [copiedNsec, setCopiedNsec] = useState(false)
- const [copiedNcryptsec, setCopiedNcryptsec] = useState(false)
return (
- push(toGeneralSettings())}>
-
-
-
- push(toAppearanceSettings())}>
-
-
-
- push(toRelaySettings())}>
-
-
-
- {!!pubkey && (
- push(toTranslation())}>
-
-
-
- )}
- {!!pubkey && (
- push(toWallet())}>
-
-
-
- )}
- {!!pubkey && (
- push(toPostSettings())}>
-
-
-
{t('Post settings')}
-
-
-
- )}
- {!!nsec && (
- {
- navigator.clipboard.writeText(nsec)
- setCopiedNsec(true)
- setTimeout(() => setCopiedNsec(false), 2000)
- }}
- >
-
-
-
{t('Copy private key')} (nsec)
-
- {copiedNsec ? : }
-
- )}
- {!!ncryptsec && (
- {
- navigator.clipboard.writeText(ncryptsec)
- setCopiedNcryptsec(true)
- setTimeout(() => setCopiedNcryptsec(false), 2000)
- }}
- >
-
-
-
{t('Copy private key')} (ncryptsec)
-
- {copiedNcryptsec ? : }
-
- )}
-
-
-
-
-
- v{import.meta.env.APP_VERSION} ({import.meta.env.GIT_COMMIT})
-
-
-
-
-
-
-
-
+
)
})
SettingsPage.displayName = 'SettingsPage'
export default SettingsPage
-
-const SettingItem = forwardRef
>(
- ({ children, className, ...props }, ref) => {
- return (
-
- {children}
-
- )
- }
-)
-SettingItem.displayName = 'SettingItem'
diff --git a/src/providers/UserPreferencesProvider.tsx b/src/providers/UserPreferencesProvider.tsx
index 19280297..61214bd4 100644
--- a/src/providers/UserPreferencesProvider.tsx
+++ b/src/providers/UserPreferencesProvider.tsx
@@ -1,6 +1,7 @@
import storage from '@/services/local-storage.service'
import { TNotificationStyle } from '@/types'
import { createContext, useContext, useState } from 'react'
+import { useScreenSize } from './ScreenSizeProvider'
type TUserPreferencesContext = {
notificationListStyle: TNotificationStyle
@@ -27,6 +28,7 @@ export const useUserPreferences = () => {
}
export function UserPreferencesProvider({ children }: { children: React.ReactNode }) {
+ const { isSmallScreen } = useScreenSize()
const [notificationListStyle, setNotificationListStyle] = useState(
storage.getNotificationListStyle()
)
@@ -60,7 +62,7 @@ export function UserPreferencesProvider({ children }: { children: React.ReactNod
updateMuteMedia: setMuteMedia,
sidebarCollapse,
updateSidebarCollapse,
- enableSingleColumnLayout,
+ enableSingleColumnLayout: isSmallScreen ? true : enableSingleColumnLayout,
updateEnableSingleColumnLayout
}}
>