refactor(shared): remove reexport of react-router and nuqs

This commit is contained in:
melvinchia3636
2026-06-09 09:46:23 +08:00
parent 4a28995c18
commit 06dd011702
120 changed files with 202 additions and 469 deletions

View File

@@ -37,7 +37,6 @@
"react-dom": "^19.2.0",
"react-error-boundary": "^6.0.0",
"react-medium-image-zoom": "^5.3.0",
"react-router": "^7.9.4",
"react-syntax-highlighter": "^15.6.1",
"remark-gfm": "^4.0.1",
"@lifeforge/shared": "workspace:*",

View File

@@ -1,11 +1,7 @@
import { useEffect } from 'react'
import { ErrorBoundary } from 'react-error-boundary'
import {
Navigate,
RouterProvider,
createBrowserRouter
} from '@lifeforge/shared'
import { Navigate, RouterProvider, createBrowserRouter } from 'react-router'
import { ErrorScreen, NotFoundScreen } from '@lifeforge/ui'
import ROUTES from './Router'

View File

@@ -1,6 +1,6 @@
import _ from 'lodash'
import type { RouteObject } from '@lifeforge/shared'
import type { RouteObject } from 'react-router'
import { components as COMPONENTS } from './components/MdxComponents'

View File

@@ -2,7 +2,7 @@ import { Icon } from '@iconify/react'
import _ from 'lodash'
import { useMemo } from 'react'
import { Link, useLocation } from '@lifeforge/shared'
import { Link, useLocation } from 'react-router'
import ROUTES from '../../../Router'

View File

@@ -2,7 +2,7 @@ import { Icon } from '@iconify/react'
import { useEffect } from 'react'
import Scrollbars from 'react-custom-scrollbars'
import { useLocation } from '@lifeforge/shared'
import { useLocation } from 'react-router'
import { BLACKLISTED_PAGES } from '../Rightbar'
import NavigationBar from './components/NavigationBar'

View File

@@ -1,6 +1,5 @@
import { Icon } from '@iconify/react'
import { Link } from '@lifeforge/shared'
import { Link } from 'react-router'
function CustomLink({ text, to }: { text: string; to: string }) {
return (

View File

@@ -1,7 +1,7 @@
import { Icon } from '@iconify/react'
import { Link } from 'react-router'
import { Link } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/ui'
import GithubStarCount from './GithubStarCount'

View File

@@ -1,6 +1,6 @@
import { useState } from 'react'
import { Outlet } from '@lifeforge/shared'
import { Outlet } from 'react-router'
import Boilerplate from './Boilerplate'
import Header from './Header'

View File

@@ -1,7 +1,6 @@
import type { MDXComponents } from 'mdx/types'
import Zoom from 'react-medium-image-zoom'
import { Link } from '@lifeforge/shared'
import { Link } from 'react-router'
import Code from './Code'

View File

@@ -2,7 +2,7 @@ import { Icon } from '@iconify/react'
import _ from 'lodash'
import { useEffect, useRef, useState } from 'react'
import { useLocation } from '@lifeforge/shared'
import { useLocation } from 'react-router'
export const BLACKLISTED_PAGES = ['/progress/changelog']

View File

@@ -1,7 +1,7 @@
import _ from 'lodash'
import { Scrollbars } from 'react-custom-scrollbars'
import { Link, useLocation } from '@lifeforge/shared'
import { Link, useLocation } from 'react-router'
import ROUTES from '../Router'

View File

@@ -1,4 +1,4 @@
import { usePersonalization } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/ui'
const COLORS = ['bg-slate', 'bg-gray', 'bg-zinc', 'bg-neutral', 'bg-stone']

View File

@@ -1,7 +1,7 @@
import { Icon } from '@iconify/react'
import { useEffect, useState } from 'react'
import { usePersonalization } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/ui'
import { Button, ColorInput, Switch } from '@lifeforge/ui'
function CustomColorInput() {

View File

@@ -1,6 +1,6 @@
import { Icon } from '@iconify/react'
import { usePersonalization } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/ui'
function LightAndDarkMode() {
const { derivedTheme, setTheme } = usePersonalization()

View File

@@ -1,6 +1,6 @@
import { Icon } from '@iconify/react'
import { usePersonalization } from '@lifeforge/shared'
import { usePersonalization } from '@lifeforge/ui'
function ThemeColors() {
const { setRawThemeColor, rawThemeColor } = usePersonalization()