diff --git a/package.json b/package.json
index 3ec3f2272..aba61167e 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "nostrudel",
"version": "0.42.0",
"private": true,
+ "type": "module",
"license": "MIT",
"repository": {
"type": "git",
@@ -94,10 +95,10 @@
"nostr-wasm": "^0.1.0",
"nuka-carousel": "^8.1.1",
"prettier": "^3.4.2",
- "react": "^18.3.1",
+ "react": "^19.0.0",
"react-chartjs-2": "^5.3.0",
"react-diff-viewer-continued": "^3.4.0",
- "react-dom": "^18.3.1",
+ "react-dom": "^19.0.0",
"react-error-boundary": "^4.1.2",
"react-force-graph-2d": "^1.26.2",
"react-force-graph-3d": "^1.25.2",
@@ -106,7 +107,7 @@
"react-mosaic-component": "^6.1.1",
"react-photo-album": "^2.4.1",
"react-qr-barcode-scanner": "^2.0.0",
- "react-router-dom": "^6.28.1",
+ "react-router": "^7.1.2",
"react-simplemde-editor": "^5.2.0",
"react-singleton-hook": "^4.0.1",
"react-use": "^17.6.0",
@@ -152,8 +153,8 @@
"@types/leaflet.locatecontrol": "^0.74.6",
"@types/lodash.throttle": "^4.1.9",
"@types/ngeohash": "^0.6.8",
- "@types/react": "^18.3.18",
- "@types/react-dom": "^18.3.5",
+ "@types/react": "^19.0.7",
+ "@types/react-dom": "^19.0.3",
"@types/react-window": "^1.8.8",
"@types/three": "^0.160.0",
"@types/webscopeio__react-textarea-autocomplete": "^4.7.5",
@@ -164,6 +165,7 @@
"typescript": "^5.7.3",
"vite": "^5.4.11",
"vite-plugin-pwa": "^0.21.1",
+ "vite-tsconfig-paths": "^5.1.4",
"workbox-build": "^7.3.0",
"workbox-window": "^7.3.0"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4bc415633..a61eea912 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23,22 +23,22 @@ importers:
version: 2.0.8
'@chakra-ui/icons':
specifier: ^2.2.4
- version: 2.2.4(@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
+ version: 2.2.4(@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)
'@chakra-ui/media-query':
specifier: ^3.3.0
- version: 3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1))(react@18.3.1)
+ version: 3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(react@19.0.0))(react@19.0.0)
'@chakra-ui/react':
specifier: ^2.10.4
- version: 2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
'@chakra-ui/shared-utils':
specifier: ^2.0.4
version: 2.0.4
'@chakra-ui/styled-system':
specifier: ^2.12.0
- version: 2.12.0(react@18.3.1)
+ version: 2.12.0(react@19.0.0)
'@chakra-ui/theme-tools':
specifier: ^2.2.6
- version: 2.2.6(@chakra-ui/styled-system@2.12.0(react@18.3.1))(react@18.3.1)
+ version: 2.2.6(@chakra-ui/styled-system@2.12.0(react@19.0.0))(react@19.0.0)
'@codemirror/autocomplete':
specifier: ^6.18.4
version: 6.18.4
@@ -56,19 +56,19 @@ importers:
version: 1.2.1
'@emoji-mart/react':
specifier: ^1.1.1
- version: 1.1.1(emoji-mart@5.6.0)(react@18.3.1)
+ version: 1.1.1(emoji-mart@5.6.0)(react@19.0.0)
'@emotion/react':
specifier: ^11.14.0
- version: 11.14.0(@types/react@18.3.18)(react@18.3.1)
+ version: 11.14.0(@types/react@18.3.18)(react@19.0.0)
'@emotion/styled':
specifier: ^11.14.0
- version: 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1)
+ version: 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0)
'@getalby/bitcoin-connect':
specifier: ^3.6.3
- version: 3.6.3(@types/react@18.3.18)(react@18.3.1)(typescript@5.7.3)
+ version: 3.6.3(@types/react@18.3.18)(react@19.0.0)(typescript@5.7.3)
'@getalby/bitcoin-connect-react':
specifier: ^3.6.3
- version: 3.6.3(@types/react@18.3.18)(react@18.3.1)(typescript@5.7.3)
+ version: 3.6.3(@types/react@18.3.18)(react@19.0.0)(typescript@5.7.3)
'@noble/ciphers':
specifier: ^1.2.0
version: 1.2.0
@@ -95,10 +95,10 @@ importers:
version: 4.23.7(@codemirror/language@6.10.8)(@codemirror/state@6.5.1)(@codemirror/view@6.36.2)
'@uiw/react-codemirror':
specifier: ^4.23.7
- version: 4.23.7(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.8)(@codemirror/state@6.5.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.2)(codemirror@6.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 4.23.7(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.8)(@codemirror/state@6.5.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.2)(codemirror@6.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
'@webscopeio/react-textarea-autocomplete':
specifier: ^4.9.2
- version: 4.9.2(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 4.9.2(prop-types@15.8.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
ansi-to-html:
specifier: ^0.7.2
version: 0.7.2
@@ -173,10 +173,10 @@ importers:
version: 2.0.5
framer-motion:
specifier: ^10.18.0
- version: 10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
gif-picker-react:
specifier: ^1.4.0
- version: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
handlebars:
specifier: ^4.7.8
version: 4.7.8
@@ -236,64 +236,64 @@ importers:
version: 0.1.0
nuka-carousel:
specifier: ^8.1.1
- version: 8.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 8.1.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
prettier:
specifier: ^3.4.2
version: 3.4.2
react:
- specifier: ^18.3.1
- version: 18.3.1
+ specifier: ^19.0.0
+ version: 19.0.0
react-chartjs-2:
specifier: ^5.3.0
- version: 5.3.0(chart.js@4.4.7)(react@18.3.1)
+ version: 5.3.0(chart.js@4.4.7)(react@19.0.0)
react-diff-viewer-continued:
specifier: ^3.4.0
- version: 3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-dom:
- specifier: ^18.3.1
- version: 18.3.1(react@18.3.1)
+ specifier: ^19.0.0
+ version: 19.0.0(react@19.0.0)
react-error-boundary:
specifier: ^4.1.2
- version: 4.1.2(react@18.3.1)
+ version: 4.1.2(react@19.0.0)
react-force-graph-2d:
specifier: ^1.26.2
- version: 1.26.2(react@18.3.1)
+ version: 1.26.2(react@19.0.0)
react-force-graph-3d:
specifier: ^1.25.2
- version: 1.25.2(react@18.3.1)
+ version: 1.25.2(react@19.0.0)
react-hook-form:
specifier: ^7.54.2
- version: 7.54.2(react@18.3.1)
+ version: 7.54.2(react@19.0.0)
react-markdown:
specifier: ^9.0.3
- version: 9.0.3(@types/react@18.3.18)(react@18.3.1)
+ version: 9.0.3(@types/react@18.3.18)(react@19.0.0)
react-mosaic-component:
specifier: ^6.1.1
- version: 6.1.1(@types/node@12.20.55)(@types/react@18.3.18)(dnd-core@16.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 6.1.1(@types/node@12.20.55)(@types/react@18.3.18)(dnd-core@16.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-photo-album:
specifier: ^2.4.1
- version: 2.4.1(react@18.3.1)
+ version: 2.4.1(react@19.0.0)
react-qr-barcode-scanner:
specifier: ^2.0.0
- version: 2.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- react-router-dom:
- specifier: ^6.28.1
- version: 6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 2.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
+ react-router:
+ specifier: ^7.1.2
+ version: 7.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-simplemde-editor:
specifier: ^5.2.0
- version: 5.2.0(easymde@2.18.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 5.2.0(easymde@2.18.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-singleton-hook:
specifier: ^4.0.1
- version: 4.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 4.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-use:
specifier: ^17.6.0
- version: 17.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 17.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-virtualized-auto-sizer:
specifier: ^1.0.25
- version: 1.0.25(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.0.25(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-window:
specifier: ^1.8.11
- version: 1.8.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.8.11(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
remark-gfm:
specifier: ^4.0.0
version: 4.0.0
@@ -341,7 +341,7 @@ importers:
version: 7.0.0
yet-another-react-lightbox:
specifier: ^3.21.7
- version: 3.21.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 3.21.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
zen-observable:
specifier: ^0.10.0
version: 0.10.0
@@ -445,6 +445,9 @@ importers:
vite-plugin-pwa:
specifier: ^0.21.1
version: 0.21.1(vite@5.4.11(@types/node@12.20.55)(terser@5.37.0))(workbox-build@7.3.0(@types/babel__core@7.20.5))(workbox-window@7.3.0)
+ vite-tsconfig-paths:
+ specifier: ^5.1.4
+ version: 5.1.4(typescript@5.7.3)(vite@5.4.11(@types/node@12.20.55)(terser@5.37.0))
workbox-build:
specifier: ^7.3.0
version: 7.3.0(@types/babel__core@7.20.5)
@@ -1664,10 +1667,6 @@ packages:
'@react-dnd/shallowequal@4.0.2':
resolution: {integrity: sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA==}
- '@remix-run/router@1.21.0':
- resolution: {integrity: sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==}
- engines: {node: '>=14.0.0'}
-
'@rollup/plugin-babel@5.3.1':
resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==}
engines: {node: '>= 10.0.0'}
@@ -1936,6 +1935,9 @@ packages:
'@types/codemirror@5.60.15':
resolution: {integrity: sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA==}
+ '@types/cookie@0.6.0':
+ resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
+
'@types/debug@4.1.12':
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
@@ -2703,6 +2705,10 @@ packages:
resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==}
engines: {node: '>= 0.6'}
+ cookie@1.0.2:
+ resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==}
+ engines: {node: '>=18'}
+
copy-to-clipboard@3.3.3:
resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==}
@@ -3448,6 +3454,9 @@ packages:
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
engines: {node: '>=10'}
+ globrex@0.1.2:
+ resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
+
gopd@1.2.0:
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
engines: {node: '>= 0.4'}
@@ -4801,10 +4810,10 @@ packages:
'@types/react':
optional: true
- react-dom@18.3.1:
- resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
+ react-dom@19.0.0:
+ resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==}
peerDependencies:
- react: ^18.3.1
+ react: ^19.0.0
react-error-boundary@4.1.2:
resolution: {integrity: sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==}
@@ -4897,18 +4906,15 @@ packages:
'@types/react':
optional: true
- react-router-dom@6.28.1:
- resolution: {integrity: sha512-YraE27C/RdjcZwl5UCqF/ffXnZDxpJdk9Q6jw38SZHjXs7NNdpViq2l2c7fO7+4uWaEfcwfGCv3RSg4e1By/fQ==}
- engines: {node: '>=14.0.0'}
+ react-router@7.1.2:
+ resolution: {integrity: sha512-KeallSO30KLpIe/ZZqfk6pCJ1c+5JhMxl3SCS3Zx1LgaGuQbgLDmjuNi6KZ5LnAV9sWjbmBWGRw8Um/Pw6BExg==}
+ engines: {node: '>=20.0.0'}
peerDependencies:
- react: '>=16.8'
- react-dom: '>=16.8'
-
- react-router@6.28.1:
- resolution: {integrity: sha512-2omQTA3rkMljmrvvo6WtewGdVh45SpL9hGiCI9uUrwGGfNFDIvGK4gYJsKlJoNVi6AQZcopSCballL+QGOm7fA==}
- engines: {node: '>=14.0.0'}
- peerDependencies:
- react: '>=16.8'
+ react: '>=18'
+ react-dom: '>=18'
+ peerDependenciesMeta:
+ react-dom:
+ optional: true
react-simplemde-editor@5.2.0:
resolution: {integrity: sha512-GkTg1MlQHVK2Rks++7sjuQr/GVS/xm6y+HchZ4GPBWrhcgLieh4CjK04GTKbsfYorSRYKa0n37rtNSJmOzEDkQ==}
@@ -4974,6 +4980,10 @@ packages:
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
+ react@19.0.0:
+ resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==}
+ engines: {node: '>=0.10.0'}
+
read-pkg-up@3.0.0:
resolution: {integrity: sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==}
engines: {node: '>=4'}
@@ -5176,8 +5186,8 @@ packages:
sax@1.4.1:
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
- scheduler@0.23.2:
- resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
+ scheduler@0.25.0:
+ resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==}
screenfull@5.2.0:
resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==}
@@ -5210,6 +5220,9 @@ packages:
set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
+ set-cookie-parser@2.7.1:
+ resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==}
+
set-function-length@1.2.2:
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
engines: {node: '>= 0.4'}
@@ -5634,6 +5647,16 @@ packages:
'@swc/wasm':
optional: true
+ tsconfck@3.1.4:
+ resolution: {integrity: sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==}
+ engines: {node: ^18 || >=20}
+ hasBin: true
+ peerDependencies:
+ typescript: ^5.0.0
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
tslib@2.4.0:
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
@@ -5646,6 +5669,9 @@ packages:
tunnel-agent@0.6.0:
resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
+ turbo-stream@2.4.0:
+ resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==}
+
type-fest@0.16.0:
resolution: {integrity: sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==}
engines: {node: '>=10'}
@@ -5851,6 +5877,14 @@ packages:
'@vite-pwa/assets-generator':
optional: true
+ vite-tsconfig-paths@5.1.4:
+ resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==}
+ peerDependencies:
+ vite: '*'
+ peerDependenciesMeta:
+ vite:
+ optional: true
+
vite@5.4.11:
resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -6968,65 +7002,65 @@ snapshots:
dependencies:
'@chakra-ui/shared-utils': 2.0.5
- '@chakra-ui/color-mode@2.2.0(react@18.3.1)':
+ '@chakra-ui/color-mode@2.2.0(react@19.0.0)':
dependencies:
- '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.3.1)
- react: 18.3.1
+ '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@19.0.0)
+ react: 19.0.0
- '@chakra-ui/hooks@2.4.3(react@18.3.1)':
+ '@chakra-ui/hooks@2.4.3(react@19.0.0)':
dependencies:
- '@chakra-ui/utils': 2.2.3(react@18.3.1)
+ '@chakra-ui/utils': 2.2.3(react@19.0.0)
'@zag-js/element-size': 0.31.1
copy-to-clipboard: 3.3.3
framesync: 6.1.2
- react: 18.3.1
+ react: 19.0.0
- '@chakra-ui/icons@2.2.4(@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/icons@2.2.4(@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)':
dependencies:
- '@chakra-ui/react': 2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- react: 18.3.1
+ '@chakra-ui/react': 2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
+ react: 19.0.0
- '@chakra-ui/media-query@3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/media-query@3.3.0(@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(react@19.0.0))(react@19.0.0)':
dependencies:
'@chakra-ui/breakpoint-utils': 2.0.8
- '@chakra-ui/react-env': 3.1.0(react@18.3.1)
+ '@chakra-ui/react-env': 3.1.0(react@19.0.0)
'@chakra-ui/shared-utils': 2.0.5
- '@chakra-ui/system': 2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1)
- react: 18.3.1
+ '@chakra-ui/system': 2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(react@19.0.0)
+ react: 19.0.0
'@chakra-ui/object-utils@2.1.0': {}
- '@chakra-ui/react-env@3.1.0(react@18.3.1)':
+ '@chakra-ui/react-env@3.1.0(react@19.0.0)':
dependencies:
- '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@18.3.1)
- react: 18.3.1
+ '@chakra-ui/react-use-safe-layout-effect': 2.1.0(react@19.0.0)
+ react: 19.0.0
- '@chakra-ui/react-use-safe-layout-effect@2.1.0(react@18.3.1)':
+ '@chakra-ui/react-use-safe-layout-effect@2.1.0(react@19.0.0)':
dependencies:
- react: 18.3.1
+ react: 19.0.0
- '@chakra-ui/react-utils@2.0.12(react@18.3.1)':
+ '@chakra-ui/react-utils@2.0.12(react@19.0.0)':
dependencies:
'@chakra-ui/utils': 2.0.15
- react: 18.3.1
+ react: 19.0.0
- '@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/react@2.10.4(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
dependencies:
- '@chakra-ui/hooks': 2.4.3(react@18.3.1)
- '@chakra-ui/styled-system': 2.12.1(react@18.3.1)
- '@chakra-ui/theme': 3.4.7(@chakra-ui/styled-system@2.12.1(react@18.3.1))(react@18.3.1)
- '@chakra-ui/utils': 2.2.3(react@18.3.1)
- '@emotion/react': 11.14.0(@types/react@18.3.18)(react@18.3.1)
- '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1)
+ '@chakra-ui/hooks': 2.4.3(react@19.0.0)
+ '@chakra-ui/styled-system': 2.12.1(react@19.0.0)
+ '@chakra-ui/theme': 3.4.7(@chakra-ui/styled-system@2.12.1(react@19.0.0))(react@19.0.0)
+ '@chakra-ui/utils': 2.2.3(react@19.0.0)
+ '@emotion/react': 11.14.0(@types/react@18.3.18)(react@19.0.0)
+ '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0)
'@popperjs/core': 2.11.8
'@zag-js/focus-visible': 0.31.1
aria-hidden: 1.2.4
- framer-motion: 10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ framer-motion: 10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
react-fast-compare: 3.2.2
- react-focus-lock: 2.13.5(@types/react@18.3.18)(react@18.3.1)
- react-remove-scroll: 2.6.2(@types/react@18.3.18)(react@18.3.1)
+ react-focus-lock: 2.13.5(@types/react@18.3.18)(react@19.0.0)
+ react-remove-scroll: 2.6.2(@types/react@18.3.18)(react@19.0.0)
transitivePeerDependencies:
- '@types/react'
@@ -7034,16 +7068,16 @@ snapshots:
'@chakra-ui/shared-utils@2.0.5': {}
- '@chakra-ui/styled-system@2.12.0(react@18.3.1)':
+ '@chakra-ui/styled-system@2.12.0(react@19.0.0)':
dependencies:
- '@chakra-ui/utils': 2.2.2(react@18.3.1)
+ '@chakra-ui/utils': 2.2.2(react@19.0.0)
csstype: 3.1.3
transitivePeerDependencies:
- react
- '@chakra-ui/styled-system@2.12.1(react@18.3.1)':
+ '@chakra-ui/styled-system@2.12.1(react@19.0.0)':
dependencies:
- '@chakra-ui/utils': 2.2.3(react@18.3.1)
+ '@chakra-ui/utils': 2.2.3(react@19.0.0)
csstype: 3.1.3
transitivePeerDependencies:
- react
@@ -7054,17 +7088,17 @@ snapshots:
csstype: 3.1.3
lodash.mergewith: 4.6.2
- '@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/system@2.6.2(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0))(react@19.0.0)':
dependencies:
- '@chakra-ui/color-mode': 2.2.0(react@18.3.1)
+ '@chakra-ui/color-mode': 2.2.0(react@19.0.0)
'@chakra-ui/object-utils': 2.1.0
- '@chakra-ui/react-utils': 2.0.12(react@18.3.1)
+ '@chakra-ui/react-utils': 2.0.12(react@19.0.0)
'@chakra-ui/styled-system': 2.9.2
'@chakra-ui/theme-utils': 2.0.21
'@chakra-ui/utils': 2.0.15
- '@emotion/react': 11.14.0(@types/react@18.3.18)(react@18.3.1)
- '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1)
- react: 18.3.1
+ '@emotion/react': 11.14.0(@types/react@18.3.18)(react@19.0.0)
+ '@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0)
+ react: 19.0.0
react-fast-compare: 3.2.2
'@chakra-ui/theme-tools@2.1.2(@chakra-ui/styled-system@2.9.2)':
@@ -7074,20 +7108,20 @@ snapshots:
'@chakra-ui/styled-system': 2.9.2
color2k: 2.0.3
- '@chakra-ui/theme-tools@2.2.6(@chakra-ui/styled-system@2.12.0(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/theme-tools@2.2.6(@chakra-ui/styled-system@2.12.0(react@19.0.0))(react@19.0.0)':
dependencies:
'@chakra-ui/anatomy': 2.3.4
- '@chakra-ui/styled-system': 2.12.0(react@18.3.1)
- '@chakra-ui/utils': 2.2.2(react@18.3.1)
+ '@chakra-ui/styled-system': 2.12.0(react@19.0.0)
+ '@chakra-ui/utils': 2.2.2(react@19.0.0)
color2k: 2.0.3
transitivePeerDependencies:
- react
- '@chakra-ui/theme-tools@2.2.7(@chakra-ui/styled-system@2.12.1(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/theme-tools@2.2.7(@chakra-ui/styled-system@2.12.1(react@19.0.0))(react@19.0.0)':
dependencies:
'@chakra-ui/anatomy': 2.3.5
- '@chakra-ui/styled-system': 2.12.1(react@18.3.1)
- '@chakra-ui/utils': 2.2.3(react@18.3.1)
+ '@chakra-ui/styled-system': 2.12.1(react@19.0.0)
+ '@chakra-ui/utils': 2.2.3(react@19.0.0)
color2k: 2.0.3
transitivePeerDependencies:
- react
@@ -7106,12 +7140,12 @@ snapshots:
'@chakra-ui/styled-system': 2.9.2
'@chakra-ui/theme-tools': 2.1.2(@chakra-ui/styled-system@2.9.2)
- '@chakra-ui/theme@3.4.7(@chakra-ui/styled-system@2.12.1(react@18.3.1))(react@18.3.1)':
+ '@chakra-ui/theme@3.4.7(@chakra-ui/styled-system@2.12.1(react@19.0.0))(react@19.0.0)':
dependencies:
'@chakra-ui/anatomy': 2.3.5
- '@chakra-ui/styled-system': 2.12.1(react@18.3.1)
- '@chakra-ui/theme-tools': 2.2.7(@chakra-ui/styled-system@2.12.1(react@18.3.1))(react@18.3.1)
- '@chakra-ui/utils': 2.2.3(react@18.3.1)
+ '@chakra-ui/styled-system': 2.12.1(react@19.0.0)
+ '@chakra-ui/theme-tools': 2.2.7(@chakra-ui/styled-system@2.12.1(react@19.0.0))(react@19.0.0)
+ '@chakra-ui/utils': 2.2.3(react@19.0.0)
transitivePeerDependencies:
- react
@@ -7122,17 +7156,17 @@ snapshots:
framesync: 6.1.2
lodash.mergewith: 4.6.2
- '@chakra-ui/utils@2.2.2(react@18.3.1)':
+ '@chakra-ui/utils@2.2.2(react@19.0.0)':
dependencies:
'@types/lodash.mergewith': 4.6.9
lodash.mergewith: 4.6.2
- react: 18.3.1
+ react: 19.0.0
- '@chakra-ui/utils@2.2.3(react@18.3.1)':
+ '@chakra-ui/utils@2.2.3(react@19.0.0)':
dependencies:
'@types/lodash.mergewith': 4.6.9
lodash.mergewith: 4.6.2
- react: 18.3.1
+ react: 19.0.0
'@changesets/apply-release-plan@7.0.7':
dependencies:
@@ -7350,10 +7384,10 @@ snapshots:
'@emoji-mart/data@1.2.1': {}
- '@emoji-mart/react@1.1.1(emoji-mart@5.6.0)(react@18.3.1)':
+ '@emoji-mart/react@1.1.1(emoji-mart@5.6.0)(react@19.0.0)':
dependencies:
emoji-mart: 5.6.0
- react: 18.3.1
+ react: 19.0.0
'@emotion/babel-plugin@11.13.5':
dependencies:
@@ -7405,17 +7439,17 @@ snapshots:
'@emotion/memoize@0.9.0': {}
- '@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1)':
+ '@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0)':
dependencies:
'@babel/runtime': 7.26.0
'@emotion/babel-plugin': 11.13.5
'@emotion/cache': 11.14.0
'@emotion/serialize': 1.3.3
- '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@18.3.1)
+ '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.0.0)
'@emotion/utils': 1.4.2
'@emotion/weak-memoize': 0.4.0
hoist-non-react-statics: 3.3.2
- react: 18.3.1
+ react: 19.0.0
optionalDependencies:
'@types/react': 18.3.18
transitivePeerDependencies:
@@ -7431,16 +7465,16 @@ snapshots:
'@emotion/sheet@1.4.0': {}
- '@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1)':
+ '@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@19.0.0))(@types/react@18.3.18)(react@19.0.0)':
dependencies:
'@babel/runtime': 7.26.0
'@emotion/babel-plugin': 11.13.5
'@emotion/is-prop-valid': 1.3.1
- '@emotion/react': 11.14.0(@types/react@18.3.18)(react@18.3.1)
+ '@emotion/react': 11.14.0(@types/react@18.3.18)(react@19.0.0)
'@emotion/serialize': 1.3.3
- '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@18.3.1)
+ '@emotion/use-insertion-effect-with-fallbacks': 1.2.0(react@19.0.0)
'@emotion/utils': 1.4.2
- react: 18.3.1
+ react: 19.0.0
optionalDependencies:
'@types/react': 18.3.18
transitivePeerDependencies:
@@ -7448,9 +7482,9 @@ snapshots:
'@emotion/unitless@0.10.0': {}
- '@emotion/use-insertion-effect-with-fallbacks@1.2.0(react@18.3.1)':
+ '@emotion/use-insertion-effect-with-fallbacks@1.2.0(react@19.0.0)':
dependencies:
- react: 18.3.1
+ react: 19.0.0
'@emotion/utils@1.4.2': {}
@@ -7525,22 +7559,22 @@ snapshots:
'@esbuild/win32-x64@0.21.5':
optional: true
- '@getalby/bitcoin-connect-react@3.6.3(@types/react@18.3.18)(react@18.3.1)(typescript@5.7.3)':
+ '@getalby/bitcoin-connect-react@3.6.3(@types/react@18.3.18)(react@19.0.0)(typescript@5.7.3)':
dependencies:
- '@getalby/bitcoin-connect': 3.6.3(@types/react@18.3.18)(react@18.3.1)(typescript@5.7.3)
- react: 18.3.1
+ '@getalby/bitcoin-connect': 3.6.3(@types/react@18.3.18)(react@19.0.0)(typescript@5.7.3)
+ react: 19.0.0
transitivePeerDependencies:
- '@types/react'
- immer
- typescript
- '@getalby/bitcoin-connect@3.6.3(@types/react@18.3.18)(react@18.3.1)(typescript@5.7.3)':
+ '@getalby/bitcoin-connect@3.6.3(@types/react@18.3.18)(react@19.0.0)(typescript@5.7.3)':
dependencies:
'@getalby/lightning-tools': 5.1.2
'@getalby/sdk': 3.9.0(typescript@5.7.3)
'@lightninglabs/lnc-web': 0.3.2-alpha
qrcode-generator: 1.4.4
- zustand: 4.5.6(@types/react@18.3.18)(react@18.3.1)
+ zustand: 4.5.6(@types/react@18.3.18)(react@19.0.0)
transitivePeerDependencies:
- '@types/react'
- immer
@@ -7842,8 +7876,6 @@ snapshots:
'@react-dnd/shallowequal@4.0.2': {}
- '@remix-run/router@1.21.0': {}
-
'@rollup/plugin-babel@5.3.1(@babel/core@7.26.0)(@types/babel__core@7.20.5)(rollup@2.79.2)':
dependencies:
'@babel/core': 7.26.0
@@ -8174,6 +8206,8 @@ snapshots:
dependencies:
'@types/tern': 0.23.9
+ '@types/cookie@0.6.0': {}
+
'@types/debug@4.1.12':
dependencies:
'@types/ms': 0.7.34
@@ -8326,7 +8360,7 @@ snapshots:
'@codemirror/state': 6.5.1
'@codemirror/view': 6.36.2
- '@uiw/react-codemirror@4.23.7(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.8)(@codemirror/state@6.5.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.2)(codemirror@6.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ '@uiw/react-codemirror@4.23.7(@babel/runtime@7.26.0)(@codemirror/autocomplete@6.18.4)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.8)(@codemirror/state@6.5.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.2)(codemirror@6.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
dependencies:
'@babel/runtime': 7.26.0
'@codemirror/commands': 6.8.0
@@ -8335,8 +8369,8 @@ snapshots:
'@codemirror/view': 6.36.2
'@uiw/codemirror-extensions-basic-setup': 4.23.7(@codemirror/autocomplete@6.18.4)(@codemirror/commands@6.8.0)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.8)(@codemirror/state@6.5.1)(@codemirror/view@6.36.2)
codemirror: 6.0.1
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
transitivePeerDependencies:
- '@codemirror/autocomplete'
- '@codemirror/language'
@@ -8356,12 +8390,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@webscopeio/react-textarea-autocomplete@4.9.2(prop-types@15.8.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ '@webscopeio/react-textarea-autocomplete@4.9.2(prop-types@15.8.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
dependencies:
custom-event: 1.0.1
prop-types: 15.8.1
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
textarea-caret: 3.0.2
'@xml-tools/parser@1.0.11':
@@ -9117,6 +9151,8 @@ snapshots:
cookie@0.7.1: {}
+ cookie@1.0.2: {}
+
copy-to-clipboard@3.3.3:
dependencies:
toggle-selection: 1.0.6
@@ -9808,13 +9844,13 @@ snapshots:
forwarded@0.2.0: {}
- framer-motion@10.18.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ framer-motion@10.18.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
tslib: 2.8.1
optionalDependencies:
'@emotion/is-prop-valid': 0.8.8
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
framesync@6.1.2:
dependencies:
@@ -9910,10 +9946,10 @@ snapshots:
es-errors: 1.3.0
get-intrinsic: 1.2.7
- gif-picker-react@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ gif-picker-react@1.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
git-raw-commits@2.0.11:
dependencies:
@@ -9975,6 +10011,8 @@ snapshots:
merge2: 1.4.1
slash: 3.0.0
+ globrex@0.1.2: {}
+
gopd@1.2.0: {}
graceful-fs@4.2.11: {}
@@ -11016,15 +11054,15 @@ snapshots:
ms@2.1.3: {}
- nano-css@5.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nano-css@5.6.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
css-tree: 1.1.3
csstype: 3.1.3
fastest-stable-stringify: 2.0.2
inline-style-prefixer: 7.0.1
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
rtl-css-js: 1.16.1
stacktrace-js: 2.0.2
stylis: 4.3.5
@@ -11156,10 +11194,10 @@ snapshots:
dependencies:
boolbase: 1.0.0
- nuka-carousel@8.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nuka-carousel@8.1.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
object-assign@4.1.1: {}
@@ -11453,25 +11491,25 @@ snapshots:
transitivePeerDependencies:
- dnd-core
- react-chartjs-2@5.3.0(chart.js@4.4.7)(react@18.3.1):
+ react-chartjs-2@5.3.0(chart.js@4.4.7)(react@19.0.0):
dependencies:
chart.js: 4.4.7
- react: 18.3.1
+ react: 19.0.0
- react-clientside-effect@1.2.7(react@18.3.1):
+ react-clientside-effect@1.2.7(react@19.0.0):
dependencies:
'@babel/runtime': 7.26.0
- react: 18.3.1
+ react: 19.0.0
- react-diff-viewer-continued@3.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-diff-viewer-continued@3.4.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@emotion/css': 11.13.5
classnames: 2.5.1
diff: 5.2.0
memoize-one: 6.0.0
prop-types: 15.8.1
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
transitivePeerDependencies:
- supports-color
@@ -11479,88 +11517,87 @@ snapshots:
dependencies:
dnd-core: 16.0.1
- react-dnd-multi-backend@8.1.2(dnd-core@16.0.1)(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-dnd-multi-backend@8.1.2(dnd-core@16.0.1)(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
dnd-core: 16.0.1
dnd-multi-backend: 8.1.2(dnd-core@16.0.1)
- react: 18.3.1
- react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1)
- react-dnd-preview: 8.1.2(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1))(react@18.3.1)
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0)
+ react-dnd-preview: 8.1.2(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0))(react@19.0.0)
+ react-dom: 19.0.0(react@19.0.0)
- react-dnd-preview@8.1.2(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1))(react@18.3.1):
+ react-dnd-preview@8.1.2(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1)
+ react: 19.0.0
+ react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0)
react-dnd-touch-backend@16.0.1:
dependencies:
'@react-dnd/invariant': 4.0.2
dnd-core: 16.0.1
- react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1):
+ react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0):
dependencies:
'@react-dnd/invariant': 4.0.2
'@react-dnd/shallowequal': 4.0.2
dnd-core: 16.0.1
fast-deep-equal: 3.1.3
hoist-non-react-statics: 3.3.2
- react: 18.3.1
+ react: 19.0.0
optionalDependencies:
'@types/node': 12.20.55
'@types/react': 18.3.18
- react-dom@18.3.1(react@18.3.1):
+ react-dom@19.0.0(react@19.0.0):
dependencies:
- loose-envify: 1.4.0
- react: 18.3.1
- scheduler: 0.23.2
+ react: 19.0.0
+ scheduler: 0.25.0
- react-error-boundary@4.1.2(react@18.3.1):
+ react-error-boundary@4.1.2(react@19.0.0):
dependencies:
'@babel/runtime': 7.26.0
- react: 18.3.1
+ react: 19.0.0
react-fast-compare@3.2.2: {}
- react-focus-lock@2.13.5(@types/react@18.3.18)(react@18.3.1):
+ react-focus-lock@2.13.5(@types/react@18.3.18)(react@19.0.0):
dependencies:
'@babel/runtime': 7.26.0
focus-lock: 1.3.6
prop-types: 15.8.1
- react: 18.3.1
- react-clientside-effect: 1.2.7(react@18.3.1)
- use-callback-ref: 1.3.3(@types/react@18.3.18)(react@18.3.1)
- use-sidecar: 1.1.3(@types/react@18.3.18)(react@18.3.1)
+ react: 19.0.0
+ react-clientside-effect: 1.2.7(react@19.0.0)
+ use-callback-ref: 1.3.3(@types/react@18.3.18)(react@19.0.0)
+ use-sidecar: 1.1.3(@types/react@18.3.18)(react@19.0.0)
optionalDependencies:
'@types/react': 18.3.18
- react-force-graph-2d@1.26.2(react@18.3.1):
+ react-force-graph-2d@1.26.2(react@19.0.0):
dependencies:
force-graph: 1.48.0
prop-types: 15.8.1
- react: 18.3.1
- react-kapsule: 2.5.6(react@18.3.1)
+ react: 19.0.0
+ react-kapsule: 2.5.6(react@19.0.0)
- react-force-graph-3d@1.25.2(react@18.3.1):
+ react-force-graph-3d@1.25.2(react@19.0.0):
dependencies:
3d-force-graph: 1.75.0
prop-types: 15.8.1
- react: 18.3.1
- react-kapsule: 2.5.6(react@18.3.1)
+ react: 19.0.0
+ react-kapsule: 2.5.6(react@19.0.0)
- react-hook-form@7.54.2(react@18.3.1):
+ react-hook-form@7.54.2(react@19.0.0):
dependencies:
- react: 18.3.1
+ react: 19.0.0
react-is@16.13.1: {}
- react-kapsule@2.5.6(react@18.3.1):
+ react-kapsule@2.5.6(react@19.0.0):
dependencies:
jerrypick: 1.1.1
- react: 18.3.1
+ react: 19.0.0
- react-markdown@9.0.3(@types/react@18.3.18)(react@18.3.1):
+ react-markdown@9.0.3(@types/react@18.3.18)(react@19.0.0):
dependencies:
'@types/hast': 3.0.4
'@types/react': 18.3.18
@@ -11568,7 +11605,7 @@ snapshots:
hast-util-to-jsx-runtime: 2.3.2
html-url-attributes: 3.0.1
mdast-util-to-hast: 13.2.0
- react: 18.3.1
+ react: 19.0.0
remark-parse: 11.0.0
remark-rehype: 11.1.1
unified: 11.0.5
@@ -11577,17 +11614,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
- react-mosaic-component@6.1.1(@types/node@12.20.55)(@types/react@18.3.18)(dnd-core@16.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-mosaic-component@6.1.1(@types/node@12.20.55)(@types/react@18.3.18)(dnd-core@16.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
classnames: 2.5.1
immutability-helper: 3.1.1
lodash: 4.17.21
prop-types: 15.8.1
rdndmb-html5-to-touch: 8.1.2(dnd-core@16.0.1)
- react: 18.3.1
- react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1)
+ react: 19.0.0
+ react-dnd: 16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0)
react-dnd-html5-backend: 16.0.1
- react-dnd-multi-backend: 8.1.2(dnd-core@16.0.1)(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ react-dnd-multi-backend: 8.1.2(dnd-core@16.0.1)(react-dnd@16.0.1(@types/node@12.20.55)(@types/react@18.3.18)(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-dnd-touch-backend: 16.0.1
uuid: 9.0.1
transitivePeerDependencies:
@@ -11597,78 +11634,76 @@ snapshots:
- dnd-core
- react-dom
- react-photo-album@2.4.1(react@18.3.1):
+ react-photo-album@2.4.1(react@19.0.0):
dependencies:
- react: 18.3.1
+ react: 19.0.0
- react-qr-barcode-scanner@2.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-qr-barcode-scanner@2.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@types/react': 18.3.18
'@zxing/library': 0.21.3
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
- react-webcam: 7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
+ react-webcam: 7.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react-refresh@0.14.2: {}
- react-remove-scroll-bar@2.3.8(@types/react@18.3.18)(react@18.3.1):
+ react-remove-scroll-bar@2.3.8(@types/react@18.3.18)(react@19.0.0):
dependencies:
- react: 18.3.1
- react-style-singleton: 2.2.3(@types/react@18.3.18)(react@18.3.1)
+ react: 19.0.0
+ react-style-singleton: 2.2.3(@types/react@18.3.18)(react@19.0.0)
tslib: 2.8.1
optionalDependencies:
'@types/react': 18.3.18
- react-remove-scroll@2.6.2(@types/react@18.3.18)(react@18.3.1):
+ react-remove-scroll@2.6.2(@types/react@18.3.18)(react@19.0.0):
dependencies:
- react: 18.3.1
- react-remove-scroll-bar: 2.3.8(@types/react@18.3.18)(react@18.3.1)
- react-style-singleton: 2.2.3(@types/react@18.3.18)(react@18.3.1)
+ react: 19.0.0
+ react-remove-scroll-bar: 2.3.8(@types/react@18.3.18)(react@19.0.0)
+ react-style-singleton: 2.2.3(@types/react@18.3.18)(react@19.0.0)
tslib: 2.8.1
- use-callback-ref: 1.3.3(@types/react@18.3.18)(react@18.3.1)
- use-sidecar: 1.1.3(@types/react@18.3.18)(react@18.3.1)
+ use-callback-ref: 1.3.3(@types/react@18.3.18)(react@19.0.0)
+ use-sidecar: 1.1.3(@types/react@18.3.18)(react@19.0.0)
optionalDependencies:
'@types/react': 18.3.18
- react-router-dom@6.28.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-router@7.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- '@remix-run/router': 1.21.0
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
- react-router: 6.28.1(react@18.3.1)
+ '@types/cookie': 0.6.0
+ cookie: 1.0.2
+ react: 19.0.0
+ set-cookie-parser: 2.7.1
+ turbo-stream: 2.4.0
+ optionalDependencies:
+ react-dom: 19.0.0(react@19.0.0)
- react-router@6.28.1(react@18.3.1):
- dependencies:
- '@remix-run/router': 1.21.0
- react: 18.3.1
-
- react-simplemde-editor@5.2.0(easymde@2.18.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-simplemde-editor@5.2.0(easymde@2.18.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@types/codemirror': 5.60.15
easymde: 2.18.0
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
- react-singleton-hook@4.0.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-singleton-hook@4.0.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
+ react: 19.0.0
optionalDependencies:
- react-dom: 18.3.1(react@18.3.1)
+ react-dom: 19.0.0(react@19.0.0)
- react-style-singleton@2.2.3(@types/react@18.3.18)(react@18.3.1):
+ react-style-singleton@2.2.3(@types/react@18.3.18)(react@19.0.0):
dependencies:
get-nonce: 1.0.1
- react: 18.3.1
+ react: 19.0.0
tslib: 2.8.1
optionalDependencies:
'@types/react': 18.3.18
- react-universal-interface@0.6.2(react@18.3.1)(tslib@2.8.1):
+ react-universal-interface@0.6.2(react@19.0.0)(tslib@2.8.1):
dependencies:
- react: 18.3.1
+ react: 19.0.0
tslib: 2.8.1
- react-use@17.6.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-use@17.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@types/js-cookie': 2.2.7
'@xobotyi/scrollbar-width': 1.9.5
@@ -11676,10 +11711,10 @@ snapshots:
fast-deep-equal: 3.1.3
fast-shallow-equal: 1.0.0
js-cookie: 2.2.1
- nano-css: 5.6.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
- react-universal-interface: 0.6.2(react@18.3.1)(tslib@2.8.1)
+ nano-css: 5.6.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
+ react-universal-interface: 0.6.2(react@19.0.0)(tslib@2.8.1)
resize-observer-polyfill: 1.5.1
screenfull: 5.2.0
set-harmonic-interval: 1.0.1
@@ -11687,27 +11722,29 @@ snapshots:
ts-easing: 0.2.0
tslib: 2.8.1
- react-virtualized-auto-sizer@1.0.25(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-virtualized-auto-sizer@1.0.25(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
- react-webcam@7.2.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-webcam@7.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
- react-window@1.8.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ react-window@1.8.11(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
'@babel/runtime': 7.26.0
memoize-one: 5.2.1
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
react@18.3.1:
dependencies:
loose-envify: 1.4.0
+ react@19.0.0: {}
+
read-pkg-up@3.0.0:
dependencies:
find-up: 2.1.0
@@ -11988,9 +12025,7 @@ snapshots:
sax@1.4.1: {}
- scheduler@0.23.2:
- dependencies:
- loose-envify: 1.4.0
+ scheduler@0.25.0: {}
screenfull@5.2.0: {}
@@ -12033,6 +12068,8 @@ snapshots:
set-blocking@2.0.0: {}
+ set-cookie-parser@2.7.1: {}
+
set-function-length@1.2.2:
dependencies:
define-data-property: 1.1.4
@@ -12540,6 +12577,10 @@ snapshots:
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
+ tsconfck@3.1.4(typescript@5.7.3):
+ optionalDependencies:
+ typescript: 5.7.3
+
tslib@2.4.0: {}
tslib@2.6.2: {}
@@ -12550,6 +12591,8 @@ snapshots:
dependencies:
safe-buffer: 5.2.1
+ turbo-stream@2.4.0: {}
+
type-fest@0.16.0: {}
type-fest@0.18.1: {}
@@ -12678,24 +12721,24 @@ snapshots:
escalade: 3.2.0
picocolors: 1.1.1
- use-callback-ref@1.3.3(@types/react@18.3.18)(react@18.3.1):
+ use-callback-ref@1.3.3(@types/react@18.3.18)(react@19.0.0):
dependencies:
- react: 18.3.1
+ react: 19.0.0
tslib: 2.8.1
optionalDependencies:
'@types/react': 18.3.18
- use-sidecar@1.1.3(@types/react@18.3.18)(react@18.3.1):
+ use-sidecar@1.1.3(@types/react@18.3.18)(react@19.0.0):
dependencies:
detect-node-es: 1.1.0
- react: 18.3.1
+ react: 19.0.0
tslib: 2.8.1
optionalDependencies:
'@types/react': 18.3.18
- use-sync-external-store@1.4.0(react@18.3.1):
+ use-sync-external-store@1.4.0(react@19.0.0):
dependencies:
- react: 18.3.1
+ react: 19.0.0
util-deprecate@1.0.2: {}
@@ -12749,6 +12792,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ vite-tsconfig-paths@5.1.4(typescript@5.7.3)(vite@5.4.11(@types/node@12.20.55)(terser@5.37.0)):
+ dependencies:
+ debug: 4.4.0
+ globrex: 0.1.2
+ tsconfck: 3.1.4(typescript@5.7.3)
+ optionalDependencies:
+ vite: 5.4.11(@types/node@12.20.55)(terser@5.37.0)
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
vite@5.4.11(@types/node@12.20.55)(terser@5.37.0):
dependencies:
esbuild: 0.21.5
@@ -13071,21 +13125,21 @@ snapshots:
buffer-crc32: 0.2.13
fd-slicer: 1.1.0
- yet-another-react-lightbox@3.21.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ yet-another-react-lightbox@3.21.7(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
- react: 18.3.1
- react-dom: 18.3.1(react@18.3.1)
+ react: 19.0.0
+ react-dom: 19.0.0(react@19.0.0)
yn@3.1.1: {}
zen-observable@0.10.0: {}
- zustand@4.5.6(@types/react@18.3.18)(react@18.3.1):
+ zustand@4.5.6(@types/react@18.3.18)(react@19.0.0):
dependencies:
- use-sync-external-store: 1.4.0(react@18.3.1)
+ use-sync-external-store: 1.4.0(react@19.0.0)
optionalDependencies:
'@types/react': 18.3.18
- react: 18.3.1
+ react: 19.0.0
zwitch@1.0.5: {}
diff --git a/src/app.tsx b/src/app.tsx
index d942eb79c..af81d1f22 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -1,176 +1,27 @@
import { lazy, Suspense } from "react";
-import { createBrowserRouter, Outlet, RouterProvider, ScrollRestoration } from "react-router-dom";
import { Spinner } from "@chakra-ui/react";
+import { createBrowserRouter, Outlet, RouterProvider, ScrollRestoration } from "react-router";
import GlobalStyles from "./styles";
import { ErrorBoundary } from "./components/error-boundary";
import AppLayout from "./components/layout";
import DrawerSubViewProvider from "./providers/drawer-sub-view-provider";
-import useSetColorMode from "./hooks/use-set-color-mode";
import { RouteProviders } from "./providers/route";
-import RequireCurrentAccount from "./components/router/require-current-account";
-import RequireBakery from "./components/router/require-bakery";
+import useSetColorMode from "./hooks/use-set-color-mode";
-import HomeView from "./views/home/index";
-const DiscoveryHomeView = lazy(() => import("./views/discovery/index"));
-const DVMFeedView = lazy(() => import("./views/discovery/dvm-feed/feed"));
-const BlindspotHomeView = lazy(() => import("./views/discovery/blindspot"));
-const BlindspotFeedView = lazy(() => import("./views/discovery/blindspot/feed"));
-const RelayDiscoveryView = lazy(() => import("./views/discovery/relays/index"));
-const MediaFeedView = lazy(() => import("./views/media/index"));
-const MediaPostView = lazy(() => import("./views/media/media-post"));
-import NostrLinkView from "./views/link";
-import ProfileView from "./views/profile";
-const HashTagView = lazy(() => import("./views/hashtag"));
-import ThreadView from "./views/thread";
-import NotificationsView from "./views/notifications";
-import ThreadsNotificationsView from "./views/notifications/threads";
-const DirectMessagesView = lazy(() => import("./views/dms"));
-const DirectMessageChatView = lazy(() => import("./views/dms/chat"));
-
-import SigninView from "./views/signin";
-import SignupView from "./views/signup";
-import LoginStartView from "./views/signin/start";
-import LoginNpubView from "./views/signin/pubkey";
-import LoginNsecView from "./views/signin/nsec";
-import LoginNostrConnectView from "./views/signin/nostr-connect";
-import LoginNostrAddressView from "./views/signin/address";
-import LoginNostrAddressCreate from "./views/signin/address/create";
-
-import UserView from "./views/user";
-import UserNotesTab from "./views/user/notes";
-import UserFollowersTab from "./views/user/followers";
-import UserRelaysTab from "./views/user/relays";
-import UserFollowingTab from "./views/user/following";
-import UserZapsTab from "./views/user/zaps";
-import UserReportsTab from "./views/user/reports";
-import UserAboutTab from "./views/user/about";
-import UserReactionsTab from "./views/user/reactions";
-import UserListsTab from "./views/user/lists";
-import UserGoalsTab from "./views/user/goals";
-import MutedByView from "./views/user/muted-by";
-import UserArticlesTab from "./views/user/articles";
-import UserMessagesTab from "./views/user/messages";
-const UserTorrentsTab = lazy(() => import("./views/user/torrents"));
-
-import ListsHomeView from "./views/lists";
-import ListView from "./views/lists/list";
-import BrowseListView from "./views/lists/browse";
-
-const EmojiPacksBrowseView = lazy(() => import("./views/emoji-packs/browse"));
-const EmojiPackView = lazy(() => import("./views/emoji-packs/emoji-pack"));
-const UserEmojiPacksTab = lazy(() => import("./views/user/emoji-packs"));
-const EmojiPacksView = lazy(() => import("./views/emoji-packs"));
-
-const GoalsView = lazy(() => import("./views/goals"));
-const GoalsBrowseView = lazy(() => import("./views/goals/browse"));
-const GoalDetailsView = lazy(() => import("./views/goals/goal-details"));
-
-const BadgesView = lazy(() => import("./views/badges"));
-const BadgesBrowseView = lazy(() => import("./views/badges/browse"));
-const BadgeDetailsView = lazy(() => import("./views/badges/badge-details"));
-
-import RelaysView from "./views/relays";
-import RelayView from "./views/relays/relay";
-import BrowseRelaySetsView from "./views/relays/browse-sets";
-import CacheRelayView from "./views/relays/cache";
-import RelaySetView from "./views/relays/relay-set";
-import AppRelaysView from "./views/relays/app";
-import MailboxesView from "./views/relays/mailboxes";
-import NIP05RelaysView from "./views/relays/nip05";
-import DatabaseView from "./views/relays/cache/database";
-import ContactListRelaysView from "./views/relays/contact-list";
-const WebRtcRelaysView = lazy(() => import("./views/relays/webrtc"));
-const WebRtcConnectView = lazy(() => import("./views/relays/webrtc/connect"));
-const WebRtcPairView = lazy(() => import("./views/relays/webrtc/pair"));
-
-import OtherStuffView from "./views/other-stuff";
-import LaunchpadView from "./views/launchpad";
-const VideosView = lazy(() => import("./views/videos"));
-const VideoDetailsView = lazy(() => import("./views/videos/video"));
-import BookmarksView from "./views/bookmarks";
import TaskManagerProvider from "./views/task-manager/provider";
-import SearchRelaysView from "./views/relays/search";
-
-import ArticlesHomeView from "./views/articles";
-import ArticleView from "./views/articles/article";
-import WalletView from "./views/wallet";
-import SupportView from "./views/support";
-import UserMediaPostsTab from "./views/user/media-posts";
-import NewView from "./views/new";
-import NewNoteView from "./views/new/note";
-import NewMediaPostView from "./views/new/media";
-const TracksView = lazy(() => import("./views/tracks"));
-const UserTracksTab = lazy(() => import("./views/user/tracks"));
-const UserVideosTab = lazy(() => import("./views/user/videos"));
-const UserFilesTab = lazy(() => import("./views/user/files"));
-
-const ToolsHomeView = lazy(() => import("./views/tools"));
-const NetworkMuteGraphView = lazy(() => import("./views/tools/network-mute-graph"));
-const NetworkDMGraphView = lazy(() => import("./views/tools/network-dm-graph"));
-const UnknownTimelineView = lazy(() => import("./views/tools/unknown-event-feed"));
-const EventConsoleView = lazy(() => import("./views/tools/event-console"));
-const EventPublisherView = lazy(() => import("./views/tools/event-publisher"));
-const DMTimelineView = lazy(() => import("./views/tools/dm-timeline"));
-const TransformNoteView = lazy(() => import("./views/tools/transform-note"));
-const CorrectionsFeedView = lazy(() => import("./views/tools/corrections"));
-const NoStrudelUsersView = lazy(() => import("./views/tools/nostrudel-users/index"));
-
-const UserStreamsTab = lazy(() => import("./views/user/streams"));
-const StreamsView = lazy(() => import("./views/streams"));
-const StreamView = lazy(() => import("./views/streams/stream"));
-const StreamModerationView = lazy(() => import("./views/streams/dashboard"));
-
-const SearchView = lazy(() => import("./views/search"));
-const MapView = lazy(() => import("./views/map"));
-
-const ChannelsHomeView = lazy(() => import("./views/channels"));
-const ChannelView = lazy(() => import("./views/channels/channel"));
-
-const TorrentsView = lazy(() => import("./views/torrents"));
-const TorrentDetailsView = lazy(() => import("./views/torrents/torrent"));
-const NewTorrentView = lazy(() => import("./views/torrents/new"));
-
-const WikiHomeView = lazy(() => import("./views/wiki"));
-const WikiPageView = lazy(() => import("./views/wiki/page"));
-const WikiTopicView = lazy(() => import("./views/wiki/topic"));
-const WikiSearchView = lazy(() => import("./views/wiki/search"));
-const WikiCompareView = lazy(() => import("./views/wiki/compare"));
-const CreateWikiPageView = lazy(() => import("./views/wiki/create"));
-const EditWikiPageView = lazy(() => import("./views/wiki/edit"));
-
-const FilesHomeView = lazy(() => import("./views/files"));
-const FileDetailsView = lazy(() => import("./views/files/file"));
-
-const PodcastsHomeView = lazy(() => import("./views/podcasts"));
-const PodcastView = lazy(() => import("./views/podcasts/podcast"));
-const EpisodeView = lazy(() => import("./views/podcasts/podcast/episode"));
-
-const BakerySetupView = lazy(() => import("./views/settings/bakery/setup"));
-const RequireBakeryAuth = lazy(() => import("./components/router/require-bakery-auth"));
-
-// setting views
-import SettingsView from "./views/settings";
-import DisplaySettings from "./views/settings/display";
-import LightningSettings from "./views/settings/lightning";
-import PerformanceSettings from "./views/settings/performance";
-import PrivacySettings from "./views/settings/privacy";
-import PostSettings from "./views/settings/post";
-import AccountSettings from "./views/settings/accounts";
-import MediaServersView from "./views/settings/media-servers";
-const BakeryConnectView = lazy(() => import("./views/settings/bakery/connect"));
-const BakeryAuthView = lazy(() => import("./views/settings/bakery/connect/auth"));
-const NotificationSettingsView = lazy(() => import("./views/settings/bakery/notifications"));
-const BakeryGeneralSettingsView = lazy(() => import("./views/settings/bakery/general-settings"));
-const BakeryNetworkSettingsView = lazy(() => import("./views/settings/bakery/network"));
-const BakeryServiceLogsView = lazy(() => import("./views/settings/bakery/service-logs"));
+/*
+ TODO: update scroll restoration to use a different key then location.key
+ the location.key changes when location.state changes, but that should not change the scroll position
+*/
const RootPage = () => {
useSetColorMode();
return (
+
);
@@ -186,392 +37,101 @@ const NoLayoutPage = () => {
);
};
+// one off views
+import NostrLinkView from "./views/link";
+const HomeView = lazy(() => import("./views/home"));
+const ProfileView = lazy(() => import("./views/profile"));
+const MapView = lazy(() => import("./views/map"));
+const LaunchpadView = lazy(() => import("./views/launchpad"));
+const OtherStuffView = lazy(() => import("./views/other-stuff"));
+const ThreadView = lazy(() => import("./views/thread"));
+const NotificationsView = lazy(() => import("./views/notifications"));
+const RelayView = lazy(() => import("./views/relays/relay"));
+const SearchView = lazy(() => import("./views/search"));
+const SupportView = lazy(() => import("./views/support"));
+const TracksView = lazy(() => import("./views/tracks"));
+const HashTagView = lazy(() => import("./views/hashtag"));
+
+// routes
+import signinRoutes from "./views/signin/routes";
+import signupRoutes from "./views/signup/routes";
+import userRoutes from "./views/user/routes";
+import newRoutes from "./views/new/routes";
+import settingsRoutes from "./views/settings/routes";
+import relaysRoutes from "./views/relays/routes";
+import videosRoutes from "./views/videos/routes";
+import mediaRoutes from "./views/media/routes";
+import streamsRoutes from "./views/streams/routes";
+import toolsRoutes from "./views/tools/routes";
+import discoveryRoutes from "./views/discovery/routes";
+import wikiRoutes from "./views/wiki/routes";
+import filesRoutes from "./views/files/routes";
+import messagesRoutes from "./views/messages/routes";
+import listsRoutes from "./views/lists/routes";
+import bookmarksRoutes from "./views/bookmarks/routes";
+import articlesRoutes from "./views/articles/routes";
+import torrentsRoutes from "./views/torrents/routes";
+import channelsRoutes from "./views/channels/routes";
+import goalsRoutes from "./views/goals/routes";
+import badgesRoutes from "./views/badges/routes";
+import emojisRoutes from "./views/emojis/routes";
+import walletRoutes from "./views/wallet/routes";
+import podcastsRoutes from "./views/podcasts/routes";
+
const router = createBrowserRouter([
{
path: "signin",
- element: ,
- children: [
- { path: "", element: },
- { path: "npub", element: },
- { path: "nsec", element: },
- {
- path: "address",
- children: [
- { path: "", element: },
- { path: "create", element: },
- ],
- },
- { path: "nostr-connect", element: },
- ],
+ Component: NoLayoutPage,
+ children: signinRoutes,
},
{
path: "signup",
- element: ,
- children: [
- {
- path: "",
- element: ,
- },
- {
- path: ":step",
- element: ,
- },
- ],
+ Component: NoLayoutPage,
+ children: signupRoutes,
},
{
- path: "/",
- element: ,
+ Component: RootPage,
children: [
- {
- path: "new",
- element: (
-
-
-
- ),
- children: [
- { path: "", element: },
- { path: "note", element: },
- { path: "media", element: },
- ],
- },
- {
- path: "launchpad",
- element: ,
- },
- {
- path: "map",
- element: ,
- },
- {
- path: "/u/:pubkey",
- element: ,
- children: [
- { path: "", element: },
- { path: "about", element: },
- { path: "notes", element: },
- { path: "articles", element: },
- { path: "media", element: },
- { path: "streams", element: },
- { path: "tracks", element: },
- { path: "videos", element: },
- { path: "files", element: },
- { path: "zaps", element: },
- { path: "reactions", element: },
- { path: "lists", element: },
- { path: "followers", element: },
- { path: "following", element: },
- { path: "goals", element: },
- { path: "emojis", element: },
- { path: "relays", element: },
- { path: "reports", element: },
- { path: "muted-by", element: },
- { path: "dms", element: },
- { path: "torrents", element: },
- ],
- },
- {
- path: "/n/:id",
- element: ,
- },
- { path: "other-stuff", element: },
- {
- path: "settings",
- element: ,
- children: [
- { path: "", element: },
- {
- path: "accounts",
- element: (
-
-
-
- ),
- },
- { path: "mailboxes", element: },
- { path: "media-servers", element: },
- { path: "search-relays", element: },
+ { index: true, Component: HomeView },
+ { path: "notes", Component: HomeView },
+ { path: "new", children: newRoutes },
+ { path: "launchpad", Component: LaunchpadView },
+ { path: "profile", Component: ProfileView },
+ { path: "messages", children: messagesRoutes },
+ { path: "user/:pubkey", children: userRoutes },
+ { path: "u/:pubkey", children: userRoutes },
+ { path: "note/:id", Component: ThreadView },
+ { path: "n/:id", Component: ThreadView },
+ { path: "search", Component: SearchView },
+ { path: "other-stuff", Component: OtherStuffView },
+ { path: "settings", children: settingsRoutes },
+ { path: "relays", children: relaysRoutes },
+ { path: "r/:relay", Component: RelayView },
+ { path: "notifications", Component: NotificationsView },
+ { path: "media", children: mediaRoutes },
+ { path: "streams", children: streamsRoutes },
+ { path: "tools", children: toolsRoutes },
+ { path: "discovery", children: discoveryRoutes },
+ { path: "wiki", children: wikiRoutes },
+ { path: "support", Component: SupportView },
+ { path: "l/:link", Component: NostrLinkView },
+ { path: "t/:hashtag", Component: HashTagView },
- { path: "relays", element: },
- { path: "cache", element: },
- { path: "display", element: },
- { path: "post", element: },
- { path: "privacy", element: },
- { path: "lightning", element: },
- { path: "performance", element: },
-
- { path: "bakery/connect", element: },
- {
- path: "bakery",
- element: (
-
-
-
- ),
- children: [
- { path: "", element: },
- {
- path: "auth",
- element: ,
- },
- { path: "notifications", element: },
- {
- path: "network",
- element: (
-
-
-
- ),
- },
- { path: "logs", element: },
- ],
- },
- ],
- },
- {
- path: "relays",
- element: ,
- children: [
- { path: "", element: },
- { path: "app", element: },
- {
- path: "cache",
- children: [
- { path: "database", element: },
- { path: "", element: },
- ],
- },
- { path: "mailboxes", element: },
- { path: "search", element: },
- { path: "media-servers", element: },
- { path: "nip05", element: },
- { path: "contacts", element: },
- {
- path: "webrtc",
- children: [
- { path: "connect", element: },
- { path: "pair", element: },
- { path: "", element: },
- ],
- },
- { path: "sets", element: },
- { path: ":id", element: },
- ],
- },
- { path: "r/:relay", element: },
- {
- path: "notifications",
- children: [
- { path: "threads", element: },
- { path: "", element: },
- ],
- },
- {
- path: "wallet",
- children: [
- {
- path: "",
- element: (
-
-
-
- ),
- },
- ],
- },
- {
- path: "podcasts",
- element: (
-
-
-
- ),
- children: [
- { path: "", element: },
- { path: ":guid", element: },
- { path: ":guid/:episode", element: },
- ],
- },
- {
- path: "videos",
- children: [
- {
- path: ":naddr",
- element: ,
- },
- {
- path: "",
- element: ,
- },
- ],
- },
- {
- path: "media",
- children: [
- { path: "", element: },
- { path: ":pointer", element: },
- ],
- },
- {
- path: "streams/moderation",
- element: ,
- },
- {
- path: "streams/:naddr",
- element: ,
- },
- {
- path: "files",
- children: [
- {
- path: "",
- element: ,
- },
- {
- path: ":nevent",
- element: ,
- },
- ],
- },
- {
- path: "wiki",
- children: [
- { path: "search", element: },
- { path: "topic/:topic", element: },
- { path: "page/:naddr", element: },
- { path: "edit/:topic", element: },
- { path: "compare/:topic/:a/:b", element: },
- { path: "create", element: },
- { path: "", element: },
- ],
- },
- {
- path: "discovery",
- children: [
- { path: "", element: },
- { path: "dvm/:addr", element: },
- {
- path: "blindspot",
- element: (
-
-
-
- ),
- children: [
- { path: "", element: },
- { path: ":pubkey", element: },
- ],
- },
- ],
- },
- { path: "search", element: },
- {
- path: "messages",
- element: ,
- children: [{ path: ":pubkey", element: }],
- },
- { path: "profile", element: },
- {
- path: "tools",
- children: [
- { path: "", element: },
- { path: "network-mute-graph", element: },
- { path: "network-dm-graph", element: },
- { path: "dm-timeline", element: },
- { path: "transform/:id", element: },
- { path: "unknown", element: },
- { path: "console", element: },
- { path: "corrections", element: },
- { path: "nostrudel-users", element: },
- {
- path: "publisher",
- element: ,
- },
- ],
- },
- {
- path: "/discovery/relays",
- element: ,
- },
- {
- path: "lists",
- children: [
- { path: "", element: },
- { path: "browse", element: },
- { path: ":addr", element: },
- ],
- },
- {
- path: "bookmarks",
- children: [
- { path: ":pubkey", element: },
- { path: "", element: },
- ],
- },
- {
- path: "articles",
- children: [
- { path: "", element: },
- { path: ":naddr", element: },
- ],
- },
- {
- path: "torrents",
- children: [
- { path: "", element: },
- { path: "new", element: },
- { path: ":id", element: },
- ],
- },
- {
- path: "channels",
- children: [
- { path: "", element: },
- { path: ":id", element: },
- ],
- },
- {
- path: "goals",
- children: [
- { path: "", element: },
- { path: "browse", element: },
- { path: ":id", element: },
- ],
- },
- {
- path: "badges",
- children: [
- { path: "", element: },
- { path: "browse", element: },
- { path: ":naddr", element: },
- ],
- },
- {
- path: "emojis",
- children: [
- { path: "", element: },
- { path: "browse", element: },
- { path: ":addr", element: },
- ],
- },
- {
- path: "streams",
- element: ,
- },
- {
- path: "support",
- children: [{ path: "", element: }],
- },
- {
- path: "tracks",
- element: ,
- },
- { path: "l/:link", element: },
- { path: "t/:hashtag", element: },
- {
- path: "",
- element: ,
- },
+ // other stuff
+ { path: "articles", children: articlesRoutes },
+ { path: "bookmarks", children: bookmarksRoutes },
+ { path: "lists", children: listsRoutes },
+ { path: "files", children: filesRoutes },
+ { path: "tracks", Component: TracksView },
+ { path: "map", Component: MapView },
+ { path: "videos", children: videosRoutes },
+ { path: "torrents", children: torrentsRoutes },
+ { path: "channels", children: channelsRoutes },
+ { path: "goals", children: goalsRoutes },
+ { path: "badges", children: badgesRoutes },
+ { path: "emojis", children: emojisRoutes },
+ { path: "wallet", children: walletRoutes },
+ { path: "podcasts", children: podcastsRoutes },
],
},
]);
diff --git a/src/components/bakery/connection-status.tsx b/src/components/bakery/connection-status.tsx
index 1ddab64f5..dbc1d8880 100644
--- a/src/components/bakery/connection-status.tsx
+++ b/src/components/bakery/connection-status.tsx
@@ -1,5 +1,5 @@
import { Alert, AlertDescription, AlertTitle, Button, Flex, Text } from "@chakra-ui/react";
-import { Link as RouterLink, useLocation } from "react-router-dom";
+import { Link as RouterLink, useLocation } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import WifiOff from "../icons/wifi-off";
diff --git a/src/components/content/index.tsx b/src/components/content/index.tsx
index 8fa6e0f24..c5d41c6ab 100644
--- a/src/components/content/index.tsx
+++ b/src/components/content/index.tsx
@@ -1,6 +1,6 @@
import { lazy } from "react";
import { Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { ComponentMap } from "applesauce-react/hooks";
import Mention from "./components/mention";
diff --git a/src/components/debug-modal/event-tags.tsx b/src/components/debug-modal/event-tags.tsx
index 21bc7828c..5eb0c2ed8 100644
--- a/src/components/debug-modal/event-tags.tsx
+++ b/src/components/debug-modal/event-tags.tsx
@@ -1,7 +1,7 @@
import { MouseEventHandler, useCallback } from "react";
import { Box, Button, Flex, Link, Text, useDisclosure } from "@chakra-ui/react";
import { NostrEvent, nip19 } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getAddressPointerFromATag, getEventPointerFromETag } from "applesauce-core/helpers";
import { Tag, isATag, isETag, isPTag } from "../../types/nostr-event";
diff --git a/src/components/debug-modal/pages/raw.tsx b/src/components/debug-modal/pages/raw.tsx
index 8fca76b1f..53a85c1a2 100644
--- a/src/components/debug-modal/pages/raw.tsx
+++ b/src/components/debug-modal/pages/raw.tsx
@@ -1,6 +1,6 @@
import { Button, ButtonGroup, Code } from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { EditIcon } from "../../icons";
import { CopyButton } from "../../copy-icon-button";
diff --git a/src/components/embed-event/event-types/embedded-article.tsx b/src/components/embed-event/event-types/embedded-article.tsx
index 80a6d94c9..9c8531153 100644
--- a/src/components/embed-event/event-types/embedded-article.tsx
+++ b/src/components/embed-event/event-types/embedded-article.tsx
@@ -1,5 +1,5 @@
import { Box, Card, CardBody, CardProps, Flex, Heading, Image, LinkBox, Text, useToast } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
getArticleImage,
diff --git a/src/components/embed-event/event-types/embedded-badge.tsx b/src/components/embed-event/event-types/embedded-badge.tsx
index 33aab6b9e..06d6f4671 100644
--- a/src/components/embed-event/event-types/embedded-badge.tsx
+++ b/src/components/embed-event/event-types/embedded-badge.tsx
@@ -1,5 +1,5 @@
import { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
Card,
CardBody,
diff --git a/src/components/embed-event/event-types/embedded-channel.tsx b/src/components/embed-event/event-types/embedded-channel.tsx
index f57540e43..7d5ce4730 100644
--- a/src/components/embed-event/event-types/embedded-channel.tsx
+++ b/src/components/embed-event/event-types/embedded-channel.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { Box, Card, CardBody, CardFooter, CardHeader, CardProps, Flex, Heading, LinkBox, Text } from "@chakra-ui/react";
import { nip19 } from "nostr-tools";
diff --git a/src/components/embed-event/event-types/embedded-dm.tsx b/src/components/embed-event/event-types/embedded-dm.tsx
index 42eb5cc7e..d5fa4b032 100644
--- a/src/components/embed-event/event-types/embedded-dm.tsx
+++ b/src/components/embed-event/event-types/embedded-dm.tsx
@@ -5,10 +5,10 @@ import { TrustProvider } from "../../../providers/local/trust-provider";
import UserAvatarLink from "../../user/user-avatar-link";
import UserLink from "../../user/user-link";
import Timestamp from "../../timestamp";
-import DecryptPlaceholder from "../../../views/dms/components/decrypt-placeholder";
+import DecryptPlaceholder from "../../../views/messages/components/decrypt-placeholder";
import useCurrentAccount from "../../../hooks/use-current-account";
import { getDMRecipient, getDMSender } from "../../../helpers/nostr/dms";
-import DirectMessageContent from "../../../views/dms/components/direct-message-content";
+import DirectMessageContent from "../../../views/messages/components/direct-message-content";
import DebugEventButton from "../../debug-modal/debug-event-button";
export default function EmbeddedDM({ dm, ...props }: Omit & { dm: NostrEvent }) {
diff --git a/src/components/embed-event/event-types/embedded-emoji-pack.tsx b/src/components/embed-event/event-types/embedded-emoji-pack.tsx
index 849a2161b..06c1519b4 100644
--- a/src/components/embed-event/event-types/embedded-emoji-pack.tsx
+++ b/src/components/embed-event/event-types/embedded-emoji-pack.tsx
@@ -11,13 +11,13 @@ import {
Link,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getEmojis, getPackName } from "applesauce-core/helpers/emoji";
import UserAvatarLink from "../../user/user-avatar-link";
import UserLink from "../../user/user-link";
-import EmojiPackFavoriteButton from "../../../views/emoji-packs/components/emoji-pack-favorite-button";
-import EmojiPackMenu from "../../../views/emoji-packs/components/emoji-pack-menu";
+import EmojiPackFavoriteButton from "../../../views/emojis/components/emoji-pack-favorite-button";
+import EmojiPackMenu from "../../../views/emojis/components/emoji-pack-menu";
import { NostrEvent } from "../../../types/nostr-event";
import Timestamp from "../../timestamp";
import { getSharableEventAddress } from "../../../services/relay-hints";
diff --git a/src/components/embed-event/event-types/embedded-file.tsx b/src/components/embed-event/event-types/embedded-file.tsx
index 7a55df93f..35ce2768a 100644
--- a/src/components/embed-event/event-types/embedded-file.tsx
+++ b/src/components/embed-event/event-types/embedded-file.tsx
@@ -1,5 +1,5 @@
import { Box, Card, CardBody, CardProps, Flex, Heading, Image, LinkBox, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getTagValue } from "applesauce-core/helpers";
import { getArticlePublishDate } from "../../../helpers/nostr/long-form";
diff --git a/src/components/embed-event/event-types/embedded-flare-video.tsx b/src/components/embed-event/event-types/embedded-flare-video.tsx
index 1acb9b6b3..553d1b166 100644
--- a/src/components/embed-event/event-types/embedded-flare-video.tsx
+++ b/src/components/embed-event/event-types/embedded-flare-video.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Card, CardBody, CardProps, Flex, Heading, Image, Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { NostrEvent } from "../../../types/nostr-event";
import UserLink from "../../user/user-link";
diff --git a/src/components/embed-event/event-types/embedded-goal.tsx b/src/components/embed-event/event-types/embedded-goal.tsx
index 2177bc632..160c4bfeb 100644
--- a/src/components/embed-event/event-types/embedded-goal.tsx
+++ b/src/components/embed-event/event-types/embedded-goal.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardHeader, CardProps, Flex, Heading, Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useMemo } from "react";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/components/embed-event/event-types/embedded-list.tsx b/src/components/embed-event/event-types/embedded-list.tsx
index 003fc7896..0def0afde 100644
--- a/src/components/embed-event/event-types/embedded-list.tsx
+++ b/src/components/embed-event/event-types/embedded-list.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardHeader, CardProps, Flex, Heading, Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getReplaceableUID } from "applesauce-core/helpers";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/components/embed-event/event-types/embedded-note.tsx b/src/components/embed-event/event-types/embedded-note.tsx
index ab3d47c35..c31f882d6 100644
--- a/src/components/embed-event/event-types/embedded-note.tsx
+++ b/src/components/embed-event/event-types/embedded-note.tsx
@@ -1,6 +1,6 @@
import { MouseEventHandler, useCallback } from "react";
import { Card, CardProps, Flex, LinkBox, Spacer } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/components/embed-event/event-types/embedded-stream-message.tsx b/src/components/embed-event/event-types/embedded-stream-message.tsx
index 129d65086..859ccb574 100644
--- a/src/components/embed-event/event-types/embedded-stream-message.tsx
+++ b/src/components/embed-event/event-types/embedded-stream-message.tsx
@@ -1,5 +1,5 @@
import { Card, CardProps, Divider, Flex, Link } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "nostr-tools";
import { isATag } from "applesauce-core/helpers";
diff --git a/src/components/embed-event/event-types/embedded-stream.tsx b/src/components/embed-event/event-types/embedded-stream.tsx
index 51c70ae53..73b8aea02 100644
--- a/src/components/embed-event/event-types/embedded-stream.tsx
+++ b/src/components/embed-event/event-types/embedded-stream.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardProps, Flex, Heading, Image, Link, Tag, Text } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { NostrEvent } from "nostr-tools";
import StreamStatusBadge from "../../../views/streams/components/status-badge";
diff --git a/src/components/embed-event/event-types/embedded-torrent-comment.tsx b/src/components/embed-event/event-types/embedded-torrent-comment.tsx
index 40f7a24db..9d6d3b269 100644
--- a/src/components/embed-event/event-types/embedded-torrent-comment.tsx
+++ b/src/components/embed-event/event-types/embedded-torrent-comment.tsx
@@ -1,5 +1,5 @@
import { Card, CardProps, Flex, LinkBox, Spacer, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "../../../types/nostr-event";
import UserAvatarLink from "../../user/user-avatar-link";
diff --git a/src/components/embed-event/event-types/embedded-torrent.tsx b/src/components/embed-event/event-types/embedded-torrent.tsx
index ba7c38e1c..ba8bea41a 100644
--- a/src/components/embed-event/event-types/embedded-torrent.tsx
+++ b/src/components/embed-event/event-types/embedded-torrent.tsx
@@ -14,7 +14,7 @@ import {
Tag,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import UserAvatarLink from "../../user/user-avatar-link";
diff --git a/src/components/embed-event/event-types/embedded-wiki-page.tsx b/src/components/embed-event/event-types/embedded-wiki-page.tsx
index 4b4892f5f..352a80eee 100644
--- a/src/components/embed-event/event-types/embedded-wiki-page.tsx
+++ b/src/components/embed-event/event-types/embedded-wiki-page.tsx
@@ -11,7 +11,7 @@ import {
Text,
} from "@chakra-ui/react";
import { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/components/layout/desktop/index.tsx b/src/components/layout/desktop/index.tsx
index 40adf6559..01887f00a 100644
--- a/src/components/layout/desktop/index.tsx
+++ b/src/components/layout/desktop/index.tsx
@@ -1,6 +1,6 @@
import { Suspense } from "react";
import { Spinner } from "@chakra-ui/react";
-import { Outlet } from "react-router-dom";
+import { Outlet } from "react-router";
import DesktopSideNav from "./side-nav";
import { ErrorBoundary } from "../../error-boundary";
diff --git a/src/components/layout/mobile/bottom-nav.tsx b/src/components/layout/mobile/bottom-nav.tsx
index bb29e158c..8932a8993 100644
--- a/src/components/layout/mobile/bottom-nav.tsx
+++ b/src/components/layout/mobile/bottom-nav.tsx
@@ -1,5 +1,5 @@
import { Avatar, Flex, IconButton, useDisclosure } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { DirectMessagesIcon, NotesIcon, NotificationsIcon, PlusCircleIcon, SearchIcon } from "../../icons";
import useRootPadding from "../../../hooks/use-root-padding";
diff --git a/src/components/layout/mobile/drawer-nav.tsx b/src/components/layout/mobile/drawer-nav.tsx
index 91ce141d2..59415e15a 100644
--- a/src/components/layout/mobile/drawer-nav.tsx
+++ b/src/components/layout/mobile/drawer-nav.tsx
@@ -12,7 +12,7 @@ import {
Spacer,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { IconButton } from "@chakra-ui/react";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/components/layout/mobile/index.tsx b/src/components/layout/mobile/index.tsx
index c7a4ebf7a..4978727fc 100644
--- a/src/components/layout/mobile/index.tsx
+++ b/src/components/layout/mobile/index.tsx
@@ -1,4 +1,4 @@
-import { Outlet } from "react-router-dom";
+import { Outlet } from "react-router";
import MobileBottomNav from "./bottom-nav";
import { ErrorBoundary } from "../../error-boundary";
diff --git a/src/components/layout/nav-items/account-switcher.tsx b/src/components/layout/nav-items/account-switcher.tsx
index 245655abe..14757202a 100644
--- a/src/components/layout/nav-items/account-switcher.tsx
+++ b/src/components/layout/nav-items/account-switcher.tsx
@@ -1,5 +1,5 @@
import { CloseIcon } from "@chakra-ui/icons";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
Box,
Button,
@@ -30,6 +30,9 @@ import UserDnsIdentity from "../../user/user-dns-identity";
import NavItem from "./nav-item";
import LogIn01 from "../../icons/log-in-01";
import { CollapsedContext } from "../context";
+import Users02 from "../../icons/users-02";
+import UserAvatarLink from "../../user/user-avatar-link";
+import UserLink from "../../user/user-link";
function AccountItem({ account, onClick }: { account: Account; onClick?: () => void }) {
const pubkey = account.pubkey;
@@ -80,23 +83,24 @@ export default function AccountSwitcher() {
return (
<>
{account ? (
-
-
+
+
{!collapsed && (
-
-
- {getDisplayName(metadata, account.pubkey)}
-
-
-
+ <>
+
+
+
+
+ }
+ />
+ >
)}
) : (
diff --git a/src/components/layout/nav-items/index.tsx b/src/components/layout/nav-items/index.tsx
index ffbccbc43..db0fe2fed 100644
--- a/src/components/layout/nav-items/index.tsx
+++ b/src/components/layout/nav-items/index.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Spacer } from "@chakra-ui/react";
-import { useLocation } from "react-router-dom";
+import { useLocation } from "react-router";
import { nip19 } from "nostr-tools";
import {
@@ -50,7 +50,7 @@ export default function NavItems() {
return (
<>
- {account && account.readonly !== false && (
+ {account && !account.readonly && (
)}
diff --git a/src/components/layout/nav-items/nav-item.tsx b/src/components/layout/nav-items/nav-item.tsx
index ca16a7f1f..f490a7eed 100644
--- a/src/components/layout/nav-items/nav-item.tsx
+++ b/src/components/layout/nav-items/nav-item.tsx
@@ -1,6 +1,6 @@
import { useContext } from "react";
import { Button, ComponentWithAs, IconButton, IconButtonProps, IconProps } from "@chakra-ui/react";
-import { Link as RouterLink, useLocation } from "react-router-dom";
+import { Link as RouterLink, useLocation } from "react-router";
import { CollapsedContext } from "../context";
diff --git a/src/components/layout/presets/simple-header.tsx b/src/components/layout/presets/simple-header.tsx
index 7f7f88eef..66b8c8c2a 100644
--- a/src/components/layout/presets/simple-header.tsx
+++ b/src/components/layout/presets/simple-header.tsx
@@ -1,7 +1,9 @@
+import { ReactNode } from "react";
import { Flex, FlexProps, Heading } from "@chakra-ui/react";
+
import { BackIconButton } from "../../router/back-button";
-export default function SimpleHeader({ children, title, ...props }: FlexProps) {
+export default function SimpleHeader({ children, title, ...props }: Omit & { title?: ReactNode }) {
return (
diff --git a/src/components/layout/presets/simple-nav-item.tsx b/src/components/layout/presets/simple-nav-item.tsx
index 840195ef0..9d86a1752 100644
--- a/src/components/layout/presets/simple-nav-item.tsx
+++ b/src/components/layout/presets/simple-nav-item.tsx
@@ -1,5 +1,5 @@
import { Button, ButtonProps } from "@chakra-ui/react";
-import { useMatch, Link as RouterLink } from "react-router-dom";
+import { useMatch, Link as RouterLink } from "react-router";
export default function SimpleNavItem({
children,
diff --git a/src/components/layout/presets/simple-parent-view.tsx b/src/components/layout/presets/simple-parent-view.tsx
index 4860db651..7fddf1790 100644
--- a/src/components/layout/presets/simple-parent-view.tsx
+++ b/src/components/layout/presets/simple-parent-view.tsx
@@ -1,5 +1,5 @@
import { PropsWithChildren, Suspense } from "react";
-import { Outlet, useMatch } from "react-router-dom";
+import { Outlet, useMatch } from "react-router";
import { Box, Flex, Spinner } from "@chakra-ui/react";
import { useBreakpointValue } from "../../../providers/global/breakpoint-provider";
diff --git a/src/components/layout/presets/simple-view.tsx b/src/components/layout/presets/simple-view.tsx
index ffabfe4b2..8c608e6c1 100644
--- a/src/components/layout/presets/simple-view.tsx
+++ b/src/components/layout/presets/simple-view.tsx
@@ -11,8 +11,9 @@ export default function SimpleView({
flush,
gap,
maxW,
+ center,
...props
-}: FlexProps & { flush?: boolean; actions?: ReactNode }) {
+}: Omit & { flush?: boolean; actions?: ReactNode; title?: ReactNode; center?: boolean }) {
return (
{actions}
@@ -28,6 +29,7 @@ export default function SimpleView({
flexGrow={1}
maxW={maxW}
w={maxW ? "full" : "initial"}
+ mx={center ? "auto" : undefined}
>
{children}
diff --git a/src/components/legacy-layout/ghost/timeline.tsx b/src/components/legacy-layout/ghost/timeline.tsx
index be306f20a..56e2e509e 100644
--- a/src/components/legacy-layout/ghost/timeline.tsx
+++ b/src/components/legacy-layout/ghost/timeline.tsx
@@ -1,6 +1,6 @@
import { Code, Flex, FlexProps, LinkBox, Text } from "@chakra-ui/react";
import { NostrEvent, kinds, nip19, nip25 } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useReadRelays } from "../../../hooks/use-client-relays";
import useCurrentAccount from "../../../hooks/use-current-account";
diff --git a/src/components/lightbox-provider.tsx b/src/components/lightbox-provider.tsx
index 2439d7674..6cc22331d 100644
--- a/src/components/lightbox-provider.tsx
+++ b/src/components/lightbox-provider.tsx
@@ -12,7 +12,7 @@ import {
} from "react";
import { Button, Flex, FlexProps, Spacer, useDisclosure } from "@chakra-ui/react";
import { useUnmount } from "react-use";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import styled from "@emotion/styled";
import Lightbox, { RenderSlideContainerProps, Slide } from "yet-another-react-lightbox";
diff --git a/src/components/markdown/wiki-link.tsx b/src/components/markdown/wiki-link.tsx
index 3789bf789..dbe5f9b39 100644
--- a/src/components/markdown/wiki-link.tsx
+++ b/src/components/markdown/wiki-link.tsx
@@ -17,7 +17,7 @@ import {
import { NostrEvent } from "nostr-tools";
import { ExtraProps } from "react-markdown";
import { getEventUID } from "nostr-idb";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { useReadRelays } from "../../hooks/use-client-relays";
diff --git a/src/components/media-post/media-post-card.tsx b/src/components/media-post/media-post-card.tsx
index 943337090..71de5aab7 100644
--- a/src/components/media-post/media-post-card.tsx
+++ b/src/components/media-post/media-post-card.tsx
@@ -1,6 +1,6 @@
import { Box, ButtonGroup, Card, CardBody, CardFooter, CardHeader, IconButton } from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import UserAvatarLink from "../user/user-avatar-link";
import UserLink from "../user/user-link";
diff --git a/src/components/message/thread-button.tsx b/src/components/message/thread-button.tsx
index f4bc2a7f2..21b5d3fe4 100644
--- a/src/components/message/thread-button.tsx
+++ b/src/components/message/thread-button.tsx
@@ -1,5 +1,5 @@
import { Button, IconButton, IconButtonProps } from "@chakra-ui/react";
-import { useLocation, useNavigate } from "react-router-dom";
+import { useLocation, useNavigate } from "react-router";
import { NostrEvent } from "nostr-tools";
import UserAvatar from "../user/user-avatar";
diff --git a/src/components/note/note-link.tsx b/src/components/note/note-link.tsx
index 2db5095e5..04e9bf363 100644
--- a/src/components/note/note-link.tsx
+++ b/src/components/note/note-link.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Link, LinkProps } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import { truncatedId } from "../../helpers/nostr/event";
diff --git a/src/components/note/note-menu.tsx b/src/components/note/note-menu.tsx
index 740d1a937..400c113f8 100644
--- a/src/components/note/note-menu.tsx
+++ b/src/components/note/note-menu.tsx
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from "react";
import { MenuItem, useDisclosure } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { BroadcastEventIcon } from "../icons";
import { NostrEvent } from "../../types/nostr-event";
diff --git a/src/components/note/open-in-drawer-button.tsx b/src/components/note/open-in-drawer-button.tsx
index 44025d172..4aae7c32c 100644
--- a/src/components/note/open-in-drawer-button.tsx
+++ b/src/components/note/open-in-drawer-button.tsx
@@ -1,6 +1,6 @@
import { MouseEventHandler, useCallback } from "react";
import { IconButton, IconButtonProps } from "@chakra-ui/react";
-import { To } from "react-router-dom";
+import { To } from "react-router";
import { DrawerIcon } from "../icons";
import { useNavigateInDrawer } from "../../providers/drawer-sub-view-provider";
diff --git a/src/components/note/timeline-note/components/reply-context.tsx b/src/components/note/timeline-note/components/reply-context.tsx
index 12debb8f6..98986fcc0 100644
--- a/src/components/note/timeline-note/components/reply-context.tsx
+++ b/src/components/note/timeline-note/components/reply-context.tsx
@@ -1,6 +1,6 @@
import { NostrEvent, nip19 } from "nostr-tools";
import { Flex, Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getThreadReferences, truncatedId } from "../../../../helpers/nostr/event";
import UserLink from "../../../user/user-link";
diff --git a/src/components/note/timeline-note/index.tsx b/src/components/note/timeline-note/index.tsx
index ceb7dbe99..3a126a398 100644
--- a/src/components/note/timeline-note/index.tsx
+++ b/src/components/note/timeline-note/index.tsx
@@ -15,7 +15,7 @@ import {
} from "@chakra-ui/react";
import { NostrEvent } from "../../../types/nostr-event";
import UserAvatarLink from "../../user/user-avatar-link";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import NoteMenu from "../note-menu";
diff --git a/src/components/relay-icon-stack.tsx b/src/components/relay-icon-stack.tsx
index c9d72f324..ad93ffacf 100644
--- a/src/components/relay-icon-stack.tsx
+++ b/src/components/relay-icon-stack.tsx
@@ -12,7 +12,7 @@ import {
Text,
useDisclosure,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { RelayFavicon } from "./relay-favicon";
import relayScoreboardService from "../services/relay-scoreboard";
diff --git a/src/components/relay-management-drawer/index.tsx b/src/components/relay-management-drawer/index.tsx
index 5463b4200..4ea4116f2 100644
--- a/src/components/relay-management-drawer/index.tsx
+++ b/src/components/relay-management-drawer/index.tsx
@@ -15,7 +15,7 @@ import {
useDisclosure,
} from "@chakra-ui/react";
import { CloseIcon } from "@chakra-ui/icons";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { NostrEvent } from "nostr-tools";
diff --git a/src/components/router/back-button.tsx b/src/components/router/back-button.tsx
index aa798446f..45730fd5f 100644
--- a/src/components/router/back-button.tsx
+++ b/src/components/router/back-button.tsx
@@ -1,5 +1,5 @@
import { IconButton, IconButtonProps } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { ChevronLeftIcon } from "../icons";
diff --git a/src/components/router/require-bakery-auth.tsx b/src/components/router/require-bakery-auth.tsx
index 3d47b9e77..0d828b5b3 100644
--- a/src/components/router/require-bakery-auth.tsx
+++ b/src/components/router/require-bakery-auth.tsx
@@ -1,6 +1,6 @@
import { PropsWithChildren, useEffect, useRef } from "react";
import { Button, Flex, Heading, Spinner } from "@chakra-ui/react";
-import { To, useLocation, Link as RouterLink, useNavigate } from "react-router-dom";
+import { To, useLocation, Link as RouterLink, useNavigate } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { useSigningContext } from "../../providers/global/signing-provider";
diff --git a/src/components/router/require-bakery.tsx b/src/components/router/require-bakery.tsx
index 17dfd2dfb..5bff24b82 100644
--- a/src/components/router/require-bakery.tsx
+++ b/src/components/router/require-bakery.tsx
@@ -1,7 +1,7 @@
import { PropsWithChildren } from "react";
import { Button, Code, Flex, Heading, Spinner, Text } from "@chakra-ui/react";
-import { Navigate, To, useLocation } from "react-router-dom";
-import { Link as RouterLink } from "react-router-dom";
+import { Navigate, To, useLocation } from "react-router";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import useReconnectAction from "../../hooks/use-reconnect-action";
diff --git a/src/components/router/require-current-account.tsx b/src/components/router/require-current-account.tsx
index ffd3a6edb..f38e76a05 100644
--- a/src/components/router/require-current-account.tsx
+++ b/src/components/router/require-current-account.tsx
@@ -1,5 +1,5 @@
import { Button, Flex, Heading, Spinner, Text } from "@chakra-ui/react";
-import { Link, useLocation } from "react-router-dom";
+import { Link, useLocation } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import accountService from "../../services/account";
diff --git a/src/components/search-modal/index.tsx b/src/components/search-modal/index.tsx
index 59feccd56..828f8117d 100644
--- a/src/components/search-modal/index.tsx
+++ b/src/components/search-modal/index.tsx
@@ -1,6 +1,6 @@
import { Flex, Input, Modal, ModalContent, ModalOverlay, ModalProps, Text } from "@chakra-ui/react";
import { useRef, useState } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useAsync, useThrottle } from "react-use";
import { matchSorter } from "match-sorter";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/components/timeline-page/generic-note-timeline/stream-note.tsx b/src/components/timeline-page/generic-note-timeline/stream-note.tsx
index 68607206e..27acdb9c1 100644
--- a/src/components/timeline-page/generic-note-timeline/stream-note.tsx
+++ b/src/components/timeline-page/generic-note-timeline/stream-note.tsx
@@ -12,7 +12,7 @@ import {
LinkOverlay,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "nostr-tools";
import useShareableEventAddress from "../../../hooks/use-shareable-event-address";
diff --git a/src/components/timeline-page/index.tsx b/src/components/timeline-page/index.tsx
index 0ed3e62b5..7a6ecc8d8 100644
--- a/src/components/timeline-page/index.tsx
+++ b/src/components/timeline-page/index.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Flex, FlexProps } from "@chakra-ui/react";
-import { useSearchParams } from "react-router-dom";
+import { useSearchParams } from "react-router";
import IntersectionObserverProvider from "../../providers/local/intersection-observer";
import GenericNoteTimeline from "./generic-note-timeline";
diff --git a/src/components/user/user-avatar-link.tsx b/src/components/user/user-avatar-link.tsx
index fba82a795..b2cecee62 100644
--- a/src/components/user/user-avatar-link.tsx
+++ b/src/components/user/user-avatar-link.tsx
@@ -1,5 +1,5 @@
import { forwardRef, memo } from "react";
-import { Link } from "react-router-dom";
+import { Link } from "react-router";
import { nip19 } from "nostr-tools";
import { UserAvatar, UserAvatarProps } from "./user-avatar";
diff --git a/src/components/user/user-link.tsx b/src/components/user/user-link.tsx
index fd00fab49..4901f8b2c 100644
--- a/src/components/user/user-link.tsx
+++ b/src/components/user/user-link.tsx
@@ -1,5 +1,5 @@
import { Link, LinkProps } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import { getDisplayName } from "../../helpers/nostr/profile";
diff --git a/src/hooks/use-cache-form.ts b/src/hooks/use-cache-form.ts
index 48e725409..595b62612 100644
--- a/src/hooks/use-cache-form.ts
+++ b/src/hooks/use-cache-form.ts
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef } from "react";
import { FieldValues, UseFormGetValues, UseFormReset, UseFormStateReturn } from "react-hook-form";
-import { useBeforeUnload } from "react-router-dom";
+import { useBeforeUnload } from "react-router";
import { logger } from "../helpers/debug";
diff --git a/src/hooks/use-params-address-pointer.ts b/src/hooks/use-params-address-pointer.ts
index 4f534f64b..d914a3e06 100644
--- a/src/hooks/use-params-address-pointer.ts
+++ b/src/hooks/use-params-address-pointer.ts
@@ -1,4 +1,4 @@
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import { nip19 } from "nostr-tools";
import type { AddressPointer } from "nostr-tools/nip19";
diff --git a/src/hooks/use-params-event-pointer.ts b/src/hooks/use-params-event-pointer.ts
index d429bc840..91d32d390 100644
--- a/src/hooks/use-params-event-pointer.ts
+++ b/src/hooks/use-params-event-pointer.ts
@@ -1,4 +1,4 @@
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import { nip19 } from "nostr-tools";
import type { EventPointer } from "nostr-tools/nip19";
diff --git a/src/hooks/use-params-pubkey-pointer.ts b/src/hooks/use-params-pubkey-pointer.ts
index 9a29b18e9..2571576f0 100644
--- a/src/hooks/use-params-pubkey-pointer.ts
+++ b/src/hooks/use-params-pubkey-pointer.ts
@@ -1,4 +1,4 @@
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import { nip19 } from "nostr-tools";
import type { ProfilePointer } from "nostr-tools/nip19";
import { isHexKey } from "../helpers/nip19";
diff --git a/src/hooks/use-route-search-value.ts b/src/hooks/use-route-search-value.ts
index 37ae7b3ef..c8250676f 100644
--- a/src/hooks/use-route-search-value.ts
+++ b/src/hooks/use-route-search-value.ts
@@ -1,5 +1,5 @@
import { useCallback, useRef } from "react";
-import { useLocation, useSearchParams } from "react-router-dom";
+import { useLocation, useSearchParams } from "react-router";
type Actions = {
setValue: (v: string | null | ((v: string | null) => string | null), replace?: boolean) => void;
diff --git a/src/hooks/use-route-state-value.ts b/src/hooks/use-route-state-value.ts
index dac534b82..a3c4d3fa3 100644
--- a/src/hooks/use-route-state-value.ts
+++ b/src/hooks/use-route-state-value.ts
@@ -1,5 +1,5 @@
import { useCallback, useRef } from "react";
-import { useLocation, useNavigate } from "react-router-dom";
+import { useLocation, useNavigate } from "react-router";
type Actions = {
setValue: (v: T | ((v: T | undefined) => T), replace?: boolean) => void;
diff --git a/src/hooks/use-router-marker.ts b/src/hooks/use-router-marker.ts
index 31a3912e2..46f35f0d0 100644
--- a/src/hooks/use-router-marker.ts
+++ b/src/hooks/use-router-marker.ts
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useRef } from "react";
-import { createMemoryRouter } from "react-router-dom";
+import { createMemoryRouter } from "react-router";
type Router = ReturnType;
diff --git a/src/hooks/use-set-color-mode.ts b/src/hooks/use-set-color-mode.ts
index be68df72c..c9ec901e7 100644
--- a/src/hooks/use-set-color-mode.ts
+++ b/src/hooks/use-set-color-mode.ts
@@ -1,5 +1,5 @@
import { useColorMode } from "@chakra-ui/react";
-import { useSearchParams } from "react-router-dom";
+import { useSearchParams } from "react-router";
import { useEffect } from "react";
import useAppSettings from "./use-user-app-settings";
diff --git a/src/index.tsx b/src/index.tsx
index f359b9495..9fd3f1341 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,11 +1,6 @@
import "./polyfill";
import { createRoot } from "react-dom/client";
-import { App } from "./app";
import { GlobalProviders } from "./providers/global";
-import { registerServiceWorker } from "./services/worker";
-
-import funding from "virtual:funding";
-console.log("Funding", funding);
import "./services/user-event-sync";
import "./services/username-search";
@@ -30,9 +25,10 @@ window.addEventListener("unload", () => {
// setup dayjs
import dayjs from "dayjs";
import relativeTimePlugin from "dayjs/plugin/relativeTime";
-dayjs.extend(relativeTimePlugin);
import localizedFormat from "dayjs/plugin/localizedFormat";
import { CAP_IS_WEB } from "./env";
+import { App } from "./app";
+dayjs.extend(relativeTimePlugin);
dayjs.extend(localizedFormat);
// register nostr: protocol handler
@@ -45,12 +41,14 @@ if (import.meta.env.PROD) {
}
}
-if (CAP_IS_WEB) registerServiceWorker();
+// if web, register service worker
+if (CAP_IS_WEB) {
+ const { registerServiceWorker } = await import("./services/worker");
+ registerServiceWorker();
+}
-const element = document.getElementById("root");
-if (!element) throw new Error("missing mount point");
-const root = createRoot(element);
-root.render(
+const root = document.getElementById("root")!;
+createRoot(root).render(
,
diff --git a/src/providers/drawer-sub-view-provider.tsx b/src/providers/drawer-sub-view-provider.tsx
index ffb52ef2e..211d0406f 100644
--- a/src/providers/drawer-sub-view-provider.tsx
+++ b/src/providers/drawer-sub-view-provider.tsx
@@ -23,7 +23,7 @@ import {
IconButton,
Spinner,
} from "@chakra-ui/react";
-import { Location, RouteObject, RouterProvider, To, createMemoryRouter, useNavigate } from "react-router-dom";
+import { Location, RouteObject, RouterProvider, To, createMemoryRouter, useNavigate } from "react-router";
import { ErrorBoundary } from "../components/error-boundary";
import ThreadView from "../views/thread";
diff --git a/src/providers/route/debug-modal-provider.tsx b/src/providers/route/debug-modal-provider.tsx
index 4cda7b6d9..fd35a3546 100644
--- a/src/providers/route/debug-modal-provider.tsx
+++ b/src/providers/route/debug-modal-provider.tsx
@@ -3,7 +3,7 @@ import { PropsWithChildren, createContext, useCallback, useContext, useMemo, use
import EventDebugModal from "../../components/debug-modal/event-debug-modal";
import useRouteStateValue from "../../hooks/use-route-state-value";
-import { UNSAFE_DataRouterContext } from "react-router-dom";
+import { UNSAFE_DataRouterContext } from "react-router";
import useRouterMarker from "../../hooks/use-router-marker";
export const DebugModalContext = createContext({
diff --git a/src/providers/route/require-read-relays.tsx b/src/providers/route/require-read-relays.tsx
index 3e8cdc296..e763816a5 100644
--- a/src/providers/route/require-read-relays.tsx
+++ b/src/providers/route/require-read-relays.tsx
@@ -1,8 +1,8 @@
import { PropsWithChildren } from "react";
import { Alert, AlertIcon, Button, Link, Spacer, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
-import { useLocation } from "react-router-dom";
+import { useLocation } from "react-router";
import { useReadRelays } from "../../hooks/use-client-relays";
import { offlineMode } from "../../services/offline-mode";
diff --git a/src/views/articles/components/article-card.tsx b/src/views/articles/components/article-card.tsx
index 05c5981e7..42b654046 100644
--- a/src/views/articles/components/article-card.tsx
+++ b/src/views/articles/components/article-card.tsx
@@ -1,7 +1,7 @@
import { memo } from "react";
import { Box, Card, Flex, Heading, LinkBox, Spacer, Text } from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
getArticleImage,
diff --git a/src/views/articles/components/article-menu.tsx b/src/views/articles/components/article-menu.tsx
index 48edd2128..fe3a5f7b8 100644
--- a/src/views/articles/components/article-menu.tsx
+++ b/src/views/articles/components/article-menu.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { MenuItem } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "nostr-tools";
import useShareableEventAddress from "../../../hooks/use-shareable-event-address";
diff --git a/src/views/articles/index.tsx b/src/views/articles/index.tsx
index 308c29c32..1305bb4c0 100644
--- a/src/views/articles/index.tsx
+++ b/src/views/articles/index.tsx
@@ -42,7 +42,7 @@ function ArticlesHomePage() {
const callback = useTimelineCurserIntersectionCallback(loader);
return (
-
+
Articles
diff --git a/src/views/articles/routes.tsx b/src/views/articles/routes.tsx
new file mode 100644
index 000000000..ea7e44de5
--- /dev/null
+++ b/src/views/articles/routes.tsx
@@ -0,0 +1,10 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const ArticlesHomeView = lazy(() => import("."));
+const ArticleView = lazy(() => import("./article"));
+
+export default [
+ { index: true, Component: ArticlesHomeView },
+ { path: ":naddr", Component: ArticleView },
+] satisfies RouteObject[];
diff --git a/src/views/badges/badge-details.tsx b/src/views/badges/badge-details.tsx
index 00c4a3b6e..7cd18da43 100644
--- a/src/views/badges/badge-details.tsx
+++ b/src/views/badges/badge-details.tsx
@@ -1,4 +1,4 @@
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { kinds } from "nostr-tools";
import { useObservable } from "applesauce-react/hooks";
import {
diff --git a/src/views/badges/components/badge-award-card.tsx b/src/views/badges/components/badge-award-card.tsx
index 49dddf3df..0c6106e99 100644
--- a/src/views/badges/components/badge-award-card.tsx
+++ b/src/views/badges/components/badge-award-card.tsx
@@ -1,6 +1,6 @@
import { memo } from "react";
import { Button, Card, Flex, Image, Link, LinkBox, Text, useDisclosure } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getBadgeAwardBadge, getBadgeAwardPubkeys, getBadgeImage, getBadgeName } from "../../../helpers/nostr/badges";
import useReplaceableEvent from "../../../hooks/use-replaceable-event";
diff --git a/src/views/badges/components/badge-card.tsx b/src/views/badges/components/badge-card.tsx
index de9e063c7..dea06bf80 100644
--- a/src/views/badges/components/badge-card.tsx
+++ b/src/views/badges/components/badge-card.tsx
@@ -1,5 +1,5 @@
import { memo } from "react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { ButtonGroup, Card, CardBody, CardHeader, CardProps, Flex, Heading, Image, Link, Text } from "@chakra-ui/react";
import { kinds } from "nostr-tools";
diff --git a/src/views/badges/index.tsx b/src/views/badges/index.tsx
index 457908df6..8a5852300 100644
--- a/src/views/badges/index.tsx
+++ b/src/views/badges/index.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Button, Flex, Heading, Image, Link, Spacer } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import { ExternalLinkIcon } from "../../components/icons";
@@ -70,9 +70,7 @@ function BadgesPage() {
);
}
-export default function BadgesView() {
- // const account = useCurrentAccount();
- // return account ? : ;
+export default function BadgesHomeView() {
return (
diff --git a/src/views/badges/routes.tsx b/src/views/badges/routes.tsx
new file mode 100644
index 000000000..2d7ebb5aa
--- /dev/null
+++ b/src/views/badges/routes.tsx
@@ -0,0 +1,12 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const BadgesHomeView = lazy(() => import("."));
+const BadgesBrowseView = lazy(() => import("./browse"));
+const BadgeDetailsView = lazy(() => import("./badge-details"));
+
+export default [
+ { index: true, Component: BadgesHomeView },
+ { path: "browse", Component: BadgesBrowseView },
+ { path: ":naddr", Component: BadgeDetailsView },
+] satisfies RouteObject[];
diff --git a/src/views/bookmarks/index.tsx b/src/views/bookmarks/index.tsx
index 878e510bf..14b0576f4 100644
--- a/src/views/bookmarks/index.tsx
+++ b/src/views/bookmarks/index.tsx
@@ -1,6 +1,6 @@
import { AddressPointer, EventPointer } from "nostr-tools/nip19";
import { Button, ButtonGroup, Flex, Heading, SimpleGrid, SkeletonText, Spinner } from "@chakra-ui/react";
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import VerticalPageLayout from "../../components/vertical-page-layout";
import useCurrentAccount from "../../hooks/use-current-account";
@@ -16,6 +16,7 @@ import useParamsProfilePointer from "../../hooks/use-params-pubkey-pointer";
import useReplaceableEvent from "../../hooks/use-replaceable-event";
import { EmbedEvent } from "../../components/embed-event";
import { aTagToAddressPointer, eTagToEventPointer } from "../../helpers/nostr/event";
+import SimpleView from "../../components/layout/presets/simple-view";
function RemoveBookmarkButton({ event }: { event: NostrEvent }) {
const { isLoading, removeBookmark } = useEventBookmarkActions(event);
@@ -60,30 +61,33 @@ function BookmarksPage({ pubkey }: { pubkey: string }) {
if (!list) return ;
return (
-
-
-
-
-
- 's Bookmarks
-
-
-
-
- {Array.from(list.tags)
- .reverse()
- .map((tag) => {
- if (isETag(tag)) {
- const pointer = eTagToEventPointer(tag);
- return ;
- } else if (isATag(tag)) {
- const pointer = aTagToAddressPointer(tag);
- return ;
- }
- return null;
- })}
-
-
+
+
+
+
+ 's Bookmarks
+
+
+ }
+ actions={}
+ maxW="4xl"
+ center
+ >
+ {Array.from(list.tags)
+ .reverse()
+ .map((tag) => {
+ if (isETag(tag)) {
+ const pointer = eTagToEventPointer(tag);
+ return ;
+ } else if (isATag(tag)) {
+ const pointer = aTagToAddressPointer(tag);
+ return ;
+ }
+ return null;
+ })}
+
);
}
diff --git a/src/views/bookmarks/routes.tsx b/src/views/bookmarks/routes.tsx
new file mode 100644
index 000000000..64361b40b
--- /dev/null
+++ b/src/views/bookmarks/routes.tsx
@@ -0,0 +1,9 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const BookmarksView = lazy(() => import("."));
+
+export default [
+ { index: true, element: },
+ { path: ":pubkey", element: },
+] satisfies RouteObject[];
diff --git a/src/views/channels/channel.tsx b/src/views/channels/channel.tsx
index 3d4181e44..7536cecb9 100644
--- a/src/views/channels/channel.tsx
+++ b/src/views/channels/channel.tsx
@@ -1,5 +1,5 @@
import { memo, useCallback, useMemo } from "react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { Button, Flex, Heading, Spacer, Spinner, useDisclosure } from "@chakra-ui/react";
import { kinds } from "nostr-tools";
import { ChannelHiddenQuery, ChannelMessagesQuery, ChannelMutedQuery } from "applesauce-channel/queries";
diff --git a/src/views/channels/components/channel-card.tsx b/src/views/channels/components/channel-card.tsx
index 7e9ac3091..22fcebde0 100644
--- a/src/views/channels/components/channel-card.tsx
+++ b/src/views/channels/components/channel-card.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import { EventPointer } from "nostr-tools/nip19";
import {
diff --git a/src/views/channels/routes.tsx b/src/views/channels/routes.tsx
new file mode 100644
index 000000000..c8e8f4200
--- /dev/null
+++ b/src/views/channels/routes.tsx
@@ -0,0 +1,10 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const ChannelsHomeView = lazy(() => import("."));
+const ChannelView = lazy(() => import("./channel"));
+
+export default [
+ { index: true, Component: ChannelsHomeView },
+ { path: ":id", Component: ChannelView },
+] satisfies RouteObject[];
diff --git a/src/views/discovery/blindspot/feed.tsx b/src/views/discovery/blindspot/feed.tsx
index bfb07f6c2..c62de991b 100644
--- a/src/views/discovery/blindspot/feed.tsx
+++ b/src/views/discovery/blindspot/feed.tsx
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from "react";
import { Flex, Heading, Spacer, Spinner, useDisclosure } from "@chakra-ui/react";
-import { Navigate } from "react-router-dom";
+import { Navigate } from "react-router";
import { kinds, NostrEvent } from "nostr-tools";
import VerticalPageLayout from "../../../components/vertical-page-layout";
diff --git a/src/views/discovery/blindspot/index.tsx b/src/views/discovery/blindspot/index.tsx
index f01166c22..ce31cc852 100644
--- a/src/views/discovery/blindspot/index.tsx
+++ b/src/views/discovery/blindspot/index.tsx
@@ -11,7 +11,7 @@ import {
SimpleGrid,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import useCurrentAccount from "../../../hooks/use-current-account";
diff --git a/src/views/discovery/dvm-feed/components/dvm-avatar.tsx b/src/views/discovery/dvm-feed/components/dvm-avatar.tsx
index fac6da730..dbd38ecd3 100644
--- a/src/views/discovery/dvm-feed/components/dvm-avatar.tsx
+++ b/src/views/discovery/dvm-feed/components/dvm-avatar.tsx
@@ -1,5 +1,5 @@
import { forwardRef } from "react";
-import { Link } from "react-router-dom";
+import { Link } from "react-router";
import { nip19 } from "nostr-tools";
import { Box, BoxProps } from "@chakra-ui/react";
diff --git a/src/views/discovery/dvm-feed/components/dvm-card.tsx b/src/views/discovery/dvm-feed/components/dvm-card.tsx
index 9e0346d66..453d9e7eb 100644
--- a/src/views/discovery/dvm-feed/components/dvm-card.tsx
+++ b/src/views/discovery/dvm-feed/components/dvm-card.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Card, CardProps, Flex, Heading, LinkBox, LinkOverlayProps, Text } from "@chakra-ui/react";
-import { Link as RouterLink, To } from "react-router-dom";
+import { Link as RouterLink, To } from "react-router";
import { getAddressPointerForEvent } from "applesauce-core/helpers";
import { AddressPointer } from "nostr-tools/nip19";
diff --git a/src/views/discovery/dvm-feed/components/dvm-name.tsx b/src/views/discovery/dvm-feed/components/dvm-name.tsx
index f77e443f7..6735350be 100644
--- a/src/views/discovery/dvm-feed/components/dvm-name.tsx
+++ b/src/views/discovery/dvm-feed/components/dvm-name.tsx
@@ -1,5 +1,5 @@
import { Link, LinkProps, Text, TextProps } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import useUserProfile from "../../../../hooks/use-user-profile";
diff --git a/src/views/discovery/dvm-feed/feed.tsx b/src/views/discovery/dvm-feed/feed.tsx
index 07bba29b8..2f549105a 100644
--- a/src/views/discovery/dvm-feed/feed.tsx
+++ b/src/views/discovery/dvm-feed/feed.tsx
@@ -23,7 +23,7 @@ import {
} from "@chakra-ui/react";
import { ChevronLeftIcon } from "@chakra-ui/icons";
import dayjs from "dayjs";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import {
DVM_CONTENT_DISCOVERY_JOB_KIND,
diff --git a/src/views/discovery/index.tsx b/src/views/discovery/index.tsx
index 60bea4a53..572235f46 100644
--- a/src/views/discovery/index.tsx
+++ b/src/views/discovery/index.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Card, Flex, Heading, Link, LinkBox, SimpleGrid, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getEventUID } from "applesauce-core/helpers";
import { kinds, NostrEvent } from "nostr-tools";
diff --git a/src/views/discovery/relays/components/relay-details.tsx b/src/views/discovery/relays/components/relay-details.tsx
index dad31c733..22f89474d 100644
--- a/src/views/discovery/relays/components/relay-details.tsx
+++ b/src/views/discovery/relays/components/relay-details.tsx
@@ -17,7 +17,7 @@ import {
} from "@chakra-ui/react";
import { useContext } from "react";
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { SelectedContext } from "../selected-context";
import { getTagValue } from "../../../../helpers/nostr/event";
diff --git a/src/views/discovery/routes.tsx b/src/views/discovery/routes.tsx
new file mode 100644
index 000000000..d44c2d145
--- /dev/null
+++ b/src/views/discovery/routes.tsx
@@ -0,0 +1,27 @@
+import { Outlet, RouteObject } from "react-router";
+import RequireCurrentAccount from "../../components/router/require-current-account";
+import { lazy } from "react";
+
+const DiscoveryHomeView = lazy(() => import("."));
+const DVMFeedView = lazy(() => import("./dvm-feed/feed"));
+const BlindspotHomeView = lazy(() => import("./blindspot"));
+const BlindspotFeedView = lazy(() => import("./blindspot/feed"));
+const RelayDiscoveryView = lazy(() => import("./relays"));
+
+export default [
+ { index: true, Component: DiscoveryHomeView },
+ { path: "dvm/:addr", Component: DVMFeedView },
+ { path: "relays", Component: RelayDiscoveryView },
+ {
+ path: "blindspot",
+ element: (
+
+
+
+ ),
+ children: [
+ { index: true, Component: BlindspotHomeView },
+ { path: ":pubkey", Component: BlindspotFeedView },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/emoji-packs/browse.tsx b/src/views/emojis/browse.tsx
similarity index 100%
rename from src/views/emoji-packs/browse.tsx
rename to src/views/emojis/browse.tsx
diff --git a/src/views/emoji-packs/components/create-modal.tsx b/src/views/emojis/components/create-modal.tsx
similarity index 97%
rename from src/views/emoji-packs/components/create-modal.tsx
rename to src/views/emojis/components/create-modal.tsx
index 63ecc0e48..1c18a5453 100644
--- a/src/views/emoji-packs/components/create-modal.tsx
+++ b/src/views/emojis/components/create-modal.tsx
@@ -13,7 +13,7 @@ import {
ModalProps,
} from "@chakra-ui/react";
import { useForm } from "react-hook-form";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { kinds } from "nostr-tools";
import dayjs from "dayjs";
diff --git a/src/views/emoji-packs/components/emoji-pack-card.tsx b/src/views/emojis/components/emoji-pack-card.tsx
similarity index 97%
rename from src/views/emoji-packs/components/emoji-pack-card.tsx
rename to src/views/emojis/components/emoji-pack-card.tsx
index a9fcadb07..6b908f7be 100644
--- a/src/views/emoji-packs/components/emoji-pack-card.tsx
+++ b/src/views/emojis/components/emoji-pack-card.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
ButtonGroup,
Card,
diff --git a/src/views/emoji-packs/components/emoji-pack-favorite-button.tsx b/src/views/emojis/components/emoji-pack-favorite-button.tsx
similarity index 100%
rename from src/views/emoji-packs/components/emoji-pack-favorite-button.tsx
rename to src/views/emojis/components/emoji-pack-favorite-button.tsx
diff --git a/src/views/emoji-packs/components/emoji-pack-menu.tsx b/src/views/emojis/components/emoji-pack-menu.tsx
similarity index 100%
rename from src/views/emoji-packs/components/emoji-pack-menu.tsx
rename to src/views/emojis/components/emoji-pack-menu.tsx
diff --git a/src/views/emoji-packs/emoji-pack.tsx b/src/views/emojis/emoji-pack.tsx
similarity index 99%
rename from src/views/emoji-packs/emoji-pack.tsx
rename to src/views/emojis/emoji-pack.tsx
index 76cbc53b2..3da0e47a4 100644
--- a/src/views/emoji-packs/emoji-pack.tsx
+++ b/src/views/emojis/emoji-pack.tsx
@@ -1,5 +1,5 @@
import { useState } from "react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { useForm } from "react-hook-form";
import { useThrottle } from "react-use";
import dayjs from "dayjs";
diff --git a/src/views/emoji-packs/index.tsx b/src/views/emojis/index.tsx
similarity index 96%
rename from src/views/emoji-packs/index.tsx
rename to src/views/emojis/index.tsx
index f501fd88b..3633a0ad1 100644
--- a/src/views/emoji-packs/index.tsx
+++ b/src/views/emojis/index.tsx
@@ -1,6 +1,6 @@
import { Button, Flex, Heading, Link, SimpleGrid, useDisclosure } from "@chakra-ui/react";
import { getAddressPointersFromList } from "applesauce-lists/helpers";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import useCurrentAccount from "../../hooks/use-current-account";
@@ -66,7 +66,7 @@ function UserEmojiPackMangerPage() {
);
}
-export default function EmojiPacksView() {
+export default function EmojisHomeView() {
const account = useCurrentAccount();
const createModal = useDisclosure();
diff --git a/src/views/emojis/routes.tsx b/src/views/emojis/routes.tsx
new file mode 100644
index 000000000..3803222a0
--- /dev/null
+++ b/src/views/emojis/routes.tsx
@@ -0,0 +1,12 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const EmojisHomeView = lazy(() => import("."));
+const EmojiPacksBrowseView = lazy(() => import("./browse"));
+const EmojiPackView = lazy(() => import("./emoji-pack"));
+
+export default [
+ { index: true, Component: EmojisHomeView },
+ { path: "browse", Component: EmojiPacksBrowseView },
+ { path: ":addr", Component: EmojiPackView },
+] satisfies RouteObject[];
diff --git a/src/views/files/index.tsx b/src/views/files/index.tsx
index d0a7a79d5..40d9294ab 100644
--- a/src/views/files/index.tsx
+++ b/src/views/files/index.tsx
@@ -14,7 +14,7 @@ import {
Thead,
Tr,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { getTagValue } from "applesauce-core/helpers";
import useTimelineLoader from "../../hooks/use-timeline-loader";
diff --git a/src/views/files/routes.tsx b/src/views/files/routes.tsx
new file mode 100644
index 000000000..1ae882cdb
--- /dev/null
+++ b/src/views/files/routes.tsx
@@ -0,0 +1,16 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const FilesHomeView = lazy(() => import("."));
+const FileDetailsView = lazy(() => import("./file"));
+
+export default [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ path: ":nevent",
+ element: ,
+ },
+] satisfies RouteObject[];
diff --git a/src/views/goals/components/goal-card.tsx b/src/views/goals/components/goal-card.tsx
index c21bb3290..e2c752ed9 100644
--- a/src/views/goals/components/goal-card.tsx
+++ b/src/views/goals/components/goal-card.tsx
@@ -1,5 +1,5 @@
import { memo } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { ButtonGroup, Card, CardBody, CardHeader, CardProps, Flex, Heading, Link, Text } from "@chakra-ui/react";
import UserAvatarLink from "../../../components/user/user-avatar-link";
diff --git a/src/views/goals/goal-details.tsx b/src/views/goals/goal-details.tsx
index c467481c8..b25d07857 100644
--- a/src/views/goals/goal-details.tsx
+++ b/src/views/goals/goal-details.tsx
@@ -1,4 +1,4 @@
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { Button, ButtonGroup, Divider, Flex, Heading, Spacer, Spinner } from "@chakra-ui/react";
import { ChevronLeftIcon } from "../../components/icons";
diff --git a/src/views/goals/index.tsx b/src/views/goals/index.tsx
index 50174ec2c..104da0a9b 100644
--- a/src/views/goals/index.tsx
+++ b/src/views/goals/index.tsx
@@ -1,5 +1,5 @@
import { Button, Center, Divider, Flex, Heading, Link, SimpleGrid, Spacer } from "@chakra-ui/react";
-import { Navigate, Link as RouterLink } from "react-router-dom";
+import { Navigate, Link as RouterLink } from "react-router";
import { getEventUID } from "applesauce-core/helpers";
import { kinds } from "nostr-tools";
@@ -59,7 +59,7 @@ function UserGoalsManagerPage() {
);
}
-export default function GoalsView() {
+export default function GoalsHomeView() {
const account = useCurrentAccount();
return (
diff --git a/src/views/goals/routes.tsx b/src/views/goals/routes.tsx
new file mode 100644
index 000000000..6dde29170
--- /dev/null
+++ b/src/views/goals/routes.tsx
@@ -0,0 +1,12 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const GoalsHomeView = lazy(() => import("."));
+const GoalsBrowseView = lazy(() => import("./browse"));
+const GoalDetailsView = lazy(() => import("./goal-details"));
+
+export default [
+ { index: true, Component: GoalsHomeView },
+ { path: "browse", Component: GoalsBrowseView },
+ { path: ":id", Component: GoalDetailsView },
+] satisfies RouteObject[];
diff --git a/src/views/hashtag/index.tsx b/src/views/hashtag/index.tsx
index efbe93645..32d1c7c68 100644
--- a/src/views/hashtag/index.tsx
+++ b/src/views/hashtag/index.tsx
@@ -12,7 +12,7 @@ import {
} from "@chakra-ui/react";
import { CloseIcon } from "@chakra-ui/icons";
-import { useLocation, useNavigate, useParams } from "react-router-dom";
+import { useLocation, useNavigate, useParams } from "react-router";
import { useAppTitle } from "../../hooks/use-app-title";
import useTimelineLoader from "../../hooks/use-timeline-loader";
import { isReply, isRepost } from "../../helpers/nostr/event";
diff --git a/src/views/launchpad/components/dms-card.tsx b/src/views/launchpad/components/dms-card.tsx
index ab020c197..c68bb91d4 100644
--- a/src/views/launchpad/components/dms-card.tsx
+++ b/src/views/launchpad/components/dms-card.tsx
@@ -1,6 +1,6 @@
import { useMemo, useState } from "react";
import { Button, Card, CardBody, CardHeader, CardProps, Flex, Heading, Link, LinkBox, Text } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { nip19 } from "nostr-tools";
diff --git a/src/views/launchpad/components/feeds-card.tsx b/src/views/launchpad/components/feeds-card.tsx
index 52c88fd6d..38c272f86 100644
--- a/src/views/launchpad/components/feeds-card.tsx
+++ b/src/views/launchpad/components/feeds-card.tsx
@@ -10,7 +10,7 @@ import {
LinkBox,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import useUserSets from "../../../hooks/use-user-lists";
diff --git a/src/views/launchpad/components/notifications-card.tsx b/src/views/launchpad/components/notifications-card.tsx
index 39497c0ce..bdb0b291d 100644
--- a/src/views/launchpad/components/notifications-card.tsx
+++ b/src/views/launchpad/components/notifications-card.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Button, Card, CardBody, CardHeader, CardProps, Heading, Link } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { NostrEvent } from "nostr-tools";
import { getEventUID } from "nostr-idb";
diff --git a/src/views/launchpad/components/search-form.tsx b/src/views/launchpad/components/search-form.tsx
index 805aa3a38..29888ef28 100644
--- a/src/views/launchpad/components/search-form.tsx
+++ b/src/views/launchpad/components/search-form.tsx
@@ -1,5 +1,5 @@
import { FormEventHandler, useCallback, useEffect, useRef, useState } from "react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { Card, Flex, FlexProps, Input, InputGroup, InputRightElement, useDisclosure } from "@chakra-ui/react";
import { matchSorter } from "match-sorter";
import { useAsync, useKeyPressEvent, useThrottle } from "react-use";
diff --git a/src/views/launchpad/components/streams-card.tsx b/src/views/launchpad/components/streams-card.tsx
index a885a354d..c31b4b9f2 100644
--- a/src/views/launchpad/components/streams-card.tsx
+++ b/src/views/launchpad/components/streams-card.tsx
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from "react";
import { Button, Card, CardBody, CardHeader, CardProps, Flex, Heading, Link, LinkBox } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import { Filter, kinds, NostrEvent } from "nostr-tools";
import { getEventUID } from "nostr-idb";
diff --git a/src/views/launchpad/components/tools-card.tsx b/src/views/launchpad/components/tools-card.tsx
index 345baf56d..aa85cc0ce 100644
--- a/src/views/launchpad/components/tools-card.tsx
+++ b/src/views/launchpad/components/tools-card.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Card, CardBody, CardHeader, CardProps, Heading, Input, Link, SimpleGrid } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import useRecentIds from "../../../hooks/use-recent-ids";
import { allApps } from "../../other-stuff/apps";
diff --git a/src/views/link/index.tsx b/src/views/link/index.tsx
index 713eb117f..c6a8f1153 100644
--- a/src/views/link/index.tsx
+++ b/src/views/link/index.tsx
@@ -1,5 +1,5 @@
import { Alert, AlertIcon, AlertTitle, Spinner } from "@chakra-ui/react";
-import { Navigate, useParams } from "react-router-dom";
+import { Navigate, useParams } from "react-router";
import { NostrEvent, kinds, nip19 } from "nostr-tools";
import { ErrorBoundary } from "../../components/error-boundary";
diff --git a/src/views/lists/components/list-card.tsx b/src/views/lists/components/list-card.tsx
index 25eab5913..616898540 100644
--- a/src/views/lists/components/list-card.tsx
+++ b/src/views/lists/components/list-card.tsx
@@ -1,5 +1,5 @@
import { memo } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
ButtonGroup,
Card,
diff --git a/src/views/lists/components/list-feed-button.tsx b/src/views/lists/components/list-feed-button.tsx
index 44bfb0399..19015e4f3 100644
--- a/src/views/lists/components/list-feed-button.tsx
+++ b/src/views/lists/components/list-feed-button.tsx
@@ -1,5 +1,5 @@
import { Button, ButtonProps } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/views/lists/components/user-card.tsx b/src/views/lists/components/user-card.tsx
index da27b4381..39bca1078 100644
--- a/src/views/lists/components/user-card.tsx
+++ b/src/views/lists/components/user-card.tsx
@@ -1,5 +1,5 @@
import { Button, Card, CardBody, CardProps, Flex, Heading, Link } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import useUserProfile from "../../../hooks/use-user-profile";
diff --git a/src/views/lists/index.tsx b/src/views/lists/index.tsx
index d248a70ca..13587d065 100644
--- a/src/views/lists/index.tsx
+++ b/src/views/lists/index.tsx
@@ -1,5 +1,5 @@
import { Button, Flex, Heading, SimpleGrid, Spacer, useDisclosure } from "@chakra-ui/react";
-import { useNavigate, Link as RouterLink, Navigate } from "react-router-dom";
+import { useNavigate, Link as RouterLink, Navigate } from "react-router";
import { getEventUID } from "applesauce-core/helpers";
import { kinds } from "nostr-tools";
@@ -23,6 +23,8 @@ function ListsHomePage() {
const genericSets = sets.filter((event) => event.kind === kinds.Genericlists);
const bookmarkSets = sets.filter((event) => event.kind === kinds.Bookmarksets);
+ const columns = { base: 1, lg: 2, xl: 3, "2xl": 4 };
+
return (
@@ -38,7 +40,7 @@ function ListsHomePage() {
Special lists
-
+
@@ -50,7 +52,7 @@ function ListsHomePage() {
People lists
-
+
{followSets.map((event) => (
))}
@@ -62,7 +64,7 @@ function ListsHomePage() {
Generic lists
-
+
{genericSets.map((event) => (
))}
@@ -74,7 +76,7 @@ function ListsHomePage() {
Bookmark lists
-
+
{bookmarkSets.map((event) => (
))}
@@ -86,7 +88,7 @@ function ListsHomePage() {
Favorite lists
-
+
{favoriteLists.map((event) => (
))}
diff --git a/src/views/lists/list/index.tsx b/src/views/lists/list/index.tsx
index c4b570204..b4e24f00e 100644
--- a/src/views/lists/list/index.tsx
+++ b/src/views/lists/list/index.tsx
@@ -1,4 +1,4 @@
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { kinds, nip19, NostrEvent } from "nostr-tools";
import type { DecodeResult } from "nostr-tools/nip19";
import { Box, Button, Flex, Heading, SimpleGrid, Spacer, Spinner, Text } from "@chakra-ui/react";
diff --git a/src/views/lists/routes.tsx b/src/views/lists/routes.tsx
new file mode 100644
index 000000000..30881c7b4
--- /dev/null
+++ b/src/views/lists/routes.tsx
@@ -0,0 +1,11 @@
+import { RouteObject } from "react-router";
+
+import ListsHomeView from ".";
+import BrowseListView from "./browse";
+import ListView from "./list";
+
+export default [
+ { index: true, element: },
+ { path: "browse", element: },
+ { path: ":addr", element: },
+] satisfies RouteObject[];
diff --git a/src/views/map/index.tsx b/src/views/map/index.tsx
index a4d7008cc..75dc05b5b 100644
--- a/src/views/map/index.tsx
+++ b/src/views/map/index.tsx
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from "react";
-import { useNavigate, useSearchParams } from "react-router-dom";
+import { useNavigate, useSearchParams } from "react-router";
import { Button, Flex } from "@chakra-ui/react";
import { useObservable } from "applesauce-react/hooks";
import { kinds } from "nostr-tools";
diff --git a/src/views/media/routes.tsx b/src/views/media/routes.tsx
new file mode 100644
index 000000000..c31df11b1
--- /dev/null
+++ b/src/views/media/routes.tsx
@@ -0,0 +1,10 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const MediaFeedView = lazy(() => import("."));
+const MediaPostView = lazy(() => import("./media-post"));
+
+export default [
+ { index: true, Component: MediaFeedView },
+ { path: ":pointer", Component: MediaPostView },
+] satisfies RouteObject[];
diff --git a/src/views/dms/chat.tsx b/src/views/messages/chat.tsx
similarity index 99%
rename from src/views/dms/chat.tsx
rename to src/views/messages/chat.tsx
index 287532af3..3df37d35b 100644
--- a/src/views/dms/chat.tsx
+++ b/src/views/messages/chat.tsx
@@ -1,6 +1,6 @@
import { memo, useCallback, useContext, useEffect, useMemo, useState } from "react";
import { Button, ButtonGroup, Card, Flex, IconButton } from "@chakra-ui/react";
-import { UNSAFE_DataRouterContext, useLocation, useNavigate } from "react-router-dom";
+import { UNSAFE_DataRouterContext, useLocation, useNavigate } from "react-router";
import { NostrEvent, kinds } from "nostr-tools";
import { ThreadIcon } from "../../components/icons";
diff --git a/src/views/dms/components/decrypt-placeholder.tsx b/src/views/messages/components/decrypt-placeholder.tsx
similarity index 100%
rename from src/views/dms/components/decrypt-placeholder.tsx
rename to src/views/messages/components/decrypt-placeholder.tsx
diff --git a/src/views/dms/components/direct-message-block.tsx b/src/views/messages/components/direct-message-block.tsx
similarity index 100%
rename from src/views/dms/components/direct-message-block.tsx
rename to src/views/messages/components/direct-message-block.tsx
diff --git a/src/views/dms/components/direct-message-content.tsx b/src/views/messages/components/direct-message-content.tsx
similarity index 100%
rename from src/views/dms/components/direct-message-content.tsx
rename to src/views/messages/components/direct-message-content.tsx
diff --git a/src/views/dms/components/send-message-form.tsx b/src/views/messages/components/send-message-form.tsx
similarity index 100%
rename from src/views/dms/components/send-message-form.tsx
rename to src/views/messages/components/send-message-form.tsx
diff --git a/src/views/dms/components/thread-drawer.tsx b/src/views/messages/components/thread-drawer.tsx
similarity index 100%
rename from src/views/dms/components/thread-drawer.tsx
rename to src/views/messages/components/thread-drawer.tsx
diff --git a/src/views/dms/index.tsx b/src/views/messages/index.tsx
similarity index 99%
rename from src/views/dms/index.tsx
rename to src/views/messages/index.tsx
index 667652592..ee2aba2ec 100644
--- a/src/views/dms/index.tsx
+++ b/src/views/messages/index.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Card, CardBody, Flex, LinkBox, LinkOverlay, Text } from "@chakra-ui/react";
-import { Outlet, Link as RouterLink, useLocation, useParams } from "react-router-dom";
+import { Outlet, Link as RouterLink, useLocation, useParams } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { nip19 } from "nostr-tools";
diff --git a/src/views/messages/routes.tsx b/src/views/messages/routes.tsx
new file mode 100644
index 000000000..6960ed936
--- /dev/null
+++ b/src/views/messages/routes.tsx
@@ -0,0 +1,16 @@
+import { lazy } from "react";
+import { Center } from "@chakra-ui/react";
+import { RouteObject } from "react-router";
+
+const DirectMessagesView = lazy(() => import("."));
+const DirectMessageChatView = lazy(() => import("./chat"));
+
+export default [
+ {
+ Component: DirectMessagesView,
+ children: [
+ { index: true, element: select conversation },
+ { path: ":pubkey", element: },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/new/index.tsx b/src/views/new/index.tsx
index ca9d15764..42cb436e7 100644
--- a/src/views/new/index.tsx
+++ b/src/views/new/index.tsx
@@ -1,9 +1,10 @@
import { Card, CardBody, ComponentWithAs, Flex, Heading, IconProps, LinkBox, SimpleGrid, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import VerticalPageLayout from "../../components/vertical-page-layout";
import { MediaIcon, NotesIcon } from "../../components/icons";
import HoverLinkOverlay from "../../components/hover-link-overlay";
+import SimpleView from "../../components/layout/presets/simple-view";
const NEW_TYPES: { title: string; path: string; summary?: string; icon: ComponentWithAs<"svg", IconProps> }[] = [
{ title: "Text Note", path: "/new/note", summary: "A short text post with media", icon: NotesIcon },
@@ -12,8 +13,7 @@ const NEW_TYPES: { title: string; path: string; summary?: string; icon: Componen
export default function NewView() {
return (
-
- Create new...
+
{NEW_TYPES.map(({ title, path, icon: Icon, summary }) => (
@@ -32,6 +32,6 @@ export default function NewView() {
))}
-
+
);
}
diff --git a/src/views/new/routes.tsx b/src/views/new/routes.tsx
new file mode 100644
index 000000000..acbc76134
--- /dev/null
+++ b/src/views/new/routes.tsx
@@ -0,0 +1,21 @@
+import { Outlet, RouteObject } from "react-router";
+import RequireCurrentAccount from "../../components/router/require-current-account";
+
+import NewView from ".";
+import NewNoteView from "./note";
+import NewMediaPostView from "./media";
+
+export default [
+ {
+ element: (
+
+
+
+ ),
+ children: [
+ { index: true, element: },
+ { path: "note", element: },
+ { path: "media", element: },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/notifications/index.tsx b/src/views/notifications/index.tsx
index 50a81963e..be2507cb2 100644
--- a/src/views/notifications/index.tsx
+++ b/src/views/notifications/index.tsx
@@ -1,6 +1,6 @@
import { memo, ReactNode, useCallback, useMemo } from "react";
import { Button, ButtonGroup, Divider, Flex, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import dayjs, { Dayjs } from "dayjs";
import { getEventUID } from "nostr-idb";
import { BehaviorSubject } from "rxjs";
@@ -182,12 +182,7 @@ function NotificationsPage() {
showReposts={showReposts}
showUnknown={showUnknown}
/>
-
-
-
-
+
diff --git a/src/views/notifications/threads.tsx b/src/views/notifications/threads.tsx
index 06617c251..58dc2efb7 100644
--- a/src/views/notifications/threads.tsx
+++ b/src/views/notifications/threads.tsx
@@ -1,7 +1,7 @@
import { MouseEventHandler, useCallback, useMemo } from "react";
import { kinds, NostrEvent } from "nostr-tools";
import { useObservable } from "applesauce-react/hooks";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import useCurrentAccount from "../../hooks/use-current-account";
import PeopleListProvider, { usePeopleListContext } from "../../providers/local/people-list-provider";
diff --git a/src/views/other-stuff/component/app-card.tsx b/src/views/other-stuff/component/app-card.tsx
index 0c4c362aa..d434b8c18 100644
--- a/src/views/other-stuff/component/app-card.tsx
+++ b/src/views/other-stuff/component/app-card.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink, To } from "react-router-dom";
+import { Link as RouterLink, To } from "react-router";
import { Card, ComponentWithAs, Flex, Heading, IconProps, Image, LinkBox, Text } from "@chakra-ui/react";
import HoverLinkOverlay from "../../../components/hover-link-overlay";
diff --git a/src/views/other-stuff/index.tsx b/src/views/other-stuff/index.tsx
index 40ceb744a..bf301ab02 100644
--- a/src/views/other-stuff/index.tsx
+++ b/src/views/other-stuff/index.tsx
@@ -16,6 +16,8 @@ export default function OtherStuffView() {
const { recent: recentApps, useThing: useApp } = useRecentIds("apps");
const autoFocusSearch = useBreakpointValue({ base: false, lg: true });
+ const columns = { base: 1, lg: 2, xl: 3, "2xl": 4 };
+
const sortByRecent = (a: App, b: App) => recentApps.indexOf(b.id) - recentApps.indexOf(a.id);
const sortByName = (a: App, b: App) => {
if (a.title === b.title) return 0;
@@ -26,7 +28,7 @@ export default function OtherStuffView() {
const renderContent = () => {
if (search.length > 0)
return (
-
+
{allApps
.filter(
(app) =>
@@ -46,7 +48,7 @@ export default function OtherStuffView() {
Recently Used
-
+
{recentApps.slice(0, 6).map((id) => {
const app = allApps.find((a) => a.id === id);
return app ? useApp(app.id)} /> : null;
@@ -68,17 +70,17 @@ export default function OtherStuffView() {
3rd Party Tools
-
+
{allApps.sort(sortByName).map((app) => (
useApp(app.id)} />
))}
-
+
{internalTools.sort(sortByName).map((app) => (
useApp(app.id)} />
))}
-
+
{externalTools.sort(sortByName).map((app) => (
useApp(app.id)} />
))}
diff --git a/src/views/podcasts/components/episode-card.tsx b/src/views/podcasts/components/episode-card.tsx
index b5b4310d9..0cd4bdbb9 100644
--- a/src/views/podcasts/components/episode-card.tsx
+++ b/src/views/podcasts/components/episode-card.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardHeader, Flex, Heading, Image, LinkBox } from "@chakra-ui/react";
-import { Link as RouterLink, useParams, useSearchParams } from "react-router-dom";
+import { Link as RouterLink, useParams, useSearchParams } from "react-router";
import { getXPathString } from "../../../helpers/nostr/podcasts";
import HoverLinkOverlay from "../../../components/hover-link-overlay";
diff --git a/src/views/podcasts/components/podcast-feed-card.tsx b/src/views/podcasts/components/podcast-feed-card.tsx
index a784bd3b7..e29d7626c 100644
--- a/src/views/podcasts/components/podcast-feed-card.tsx
+++ b/src/views/podcasts/components/podcast-feed-card.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardHeader, Flex, Heading, Image, LinkBox, Spinner } from "@chakra-ui/react";
-import { To, Link as RouterLink } from "react-router-dom";
+import { To, Link as RouterLink } from "react-router";
import {
FeedPointer,
diff --git a/src/views/podcasts/podcast/episode/index.tsx b/src/views/podcasts/podcast/episode/index.tsx
index 52b37a41c..7048b6de7 100644
--- a/src/views/podcasts/podcast/episode/index.tsx
+++ b/src/views/podcasts/podcast/episode/index.tsx
@@ -1,4 +1,4 @@
-import { Navigate, useParams, useSearchParams, Link as RouterLink } from "react-router-dom";
+import { Navigate, useParams, useSearchParams, Link as RouterLink } from "react-router";
import VerticalPageLayout from "../../../../components/vertical-page-layout";
import { Button, Flex, Heading, Image, Spinner, Text } from "@chakra-ui/react";
import ChevronLeft from "../../../../components/icons/chevron-left";
diff --git a/src/views/podcasts/podcast/index.tsx b/src/views/podcasts/podcast/index.tsx
index 6acd908ff..afc62c755 100644
--- a/src/views/podcasts/podcast/index.tsx
+++ b/src/views/podcasts/podcast/index.tsx
@@ -1,4 +1,4 @@
-import { Navigate, useParams, useSearchParams } from "react-router-dom";
+import { Navigate, useParams, useSearchParams } from "react-router";
import {
FeedPointer,
getPodcastDescription,
diff --git a/src/views/podcasts/routes.tsx b/src/views/podcasts/routes.tsx
new file mode 100644
index 000000000..7427a2700
--- /dev/null
+++ b/src/views/podcasts/routes.tsx
@@ -0,0 +1,20 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+import RequireCurrentAccount from "../../components/router/require-current-account";
+
+const PodcastsHomeView = lazy(() => import("."));
+const PodcastView = lazy(() => import("./podcast"));
+const EpisodeView = lazy(() => import("./podcast/episode"));
+
+export default [
+ {
+ index: true,
+ element: (
+
+
+
+ ),
+ },
+ { path: ":guid", Component: PodcastView },
+ { path: ":guid/:episode", Component: EpisodeView },
+] satisfies RouteObject[];
diff --git a/src/views/relays/app/relay-control.tsx b/src/views/relays/app/relay-control.tsx
index 278b5314c..b6e9ac0a0 100644
--- a/src/views/relays/app/relay-control.tsx
+++ b/src/views/relays/app/relay-control.tsx
@@ -1,5 +1,5 @@
import { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { CloseIcon } from "@chakra-ui/icons";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/views/relays/cache/components/internal-relay-card.tsx b/src/views/relays/cache/components/internal-relay-card.tsx
index 6e90005c8..42021152d 100644
--- a/src/views/relays/cache/components/internal-relay-card.tsx
+++ b/src/views/relays/cache/components/internal-relay-card.tsx
@@ -1,7 +1,7 @@
import { useState } from "react";
import { Button, Card, CardBody, CardFooter, CardHeader, Heading, Text } from "@chakra-ui/react";
import { CacheRelay, clearDB } from "nostr-idb";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { localDatabase, setCacheRelayURL } from "../../../../services/cache-relay";
import EnableWithDelete from "../components/enable-with-delete";
diff --git a/src/views/relays/cache/components/memory-relay-card.tsx b/src/views/relays/cache/components/memory-relay-card.tsx
index f868f3735..fd1f5fe20 100644
--- a/src/views/relays/cache/components/memory-relay-card.tsx
+++ b/src/views/relays/cache/components/memory-relay-card.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Card, CardBody, CardFooter, CardHeader, Heading, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import MemoryRelay from "../../../../classes/memory-relay";
import useCacheRelay from "../../../../hooks/use-cache-relay";
diff --git a/src/views/relays/cache/components/wasm-relay-card.tsx b/src/views/relays/cache/components/wasm-relay-card.tsx
index a5f19f7c0..3660063d7 100644
--- a/src/views/relays/cache/components/wasm-relay-card.tsx
+++ b/src/views/relays/cache/components/wasm-relay-card.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Card, CardBody, CardFooter, CardHeader, Heading, Link, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import WasmRelay from "../../../../services/wasm-relay";
import EnableWithDelete from "./enable-with-delete";
diff --git a/src/views/relays/cache/database/index.tsx b/src/views/relays/cache/database/index.tsx
index ea122fcd0..13165b247 100644
--- a/src/views/relays/cache/database/index.tsx
+++ b/src/views/relays/cache/database/index.tsx
@@ -1,7 +1,7 @@
import { lazy } from "react";
import { Link, Text } from "@chakra-ui/react";
import { CacheRelay } from "nostr-idb";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import WasmRelay from "../../../../services/wasm-relay";
import MemoryRelay from "../../../../classes/memory-relay";
diff --git a/src/views/relays/components/relay-card.tsx b/src/views/relays/components/relay-card.tsx
index 3f7a2f5bb..5448647cd 100644
--- a/src/views/relays/components/relay-card.tsx
+++ b/src/views/relays/components/relay-card.tsx
@@ -20,7 +20,7 @@ import {
useDisclosure,
} from "@chakra-ui/react";
import styled from "@emotion/styled";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useRelayInfo } from "../../../hooks/use-relay-info";
import { RelayFavicon } from "../../../components/relay-favicon";
diff --git a/src/views/relays/components/relay-review-note.tsx b/src/views/relays/components/relay-review-note.tsx
index fc50858ee..cfee0ed5f 100644
--- a/src/views/relays/components/relay-review-note.tsx
+++ b/src/views/relays/components/relay-review-note.tsx
@@ -1,5 +1,5 @@
import { Card, CardBody, CardHeader, Link } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import UserAvatarLink from "../../../components/user/user-avatar-link";
import UserLink from "../../../components/user/user-link";
diff --git a/src/views/relays/contact-list/index.tsx b/src/views/relays/contact-list/index.tsx
index caee3ca96..790f35881 100644
--- a/src/views/relays/contact-list/index.tsx
+++ b/src/views/relays/contact-list/index.tsx
@@ -1,7 +1,7 @@
import { Button, Flex, Heading, Link, Spinner, Text } from "@chakra-ui/react";
import BackButton from "../../../components/router/back-button";
import useCurrentAccount from "../../../hooks/use-current-account";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { RelayFavicon } from "../../../components/relay-favicon";
import useUserContactRelays from "../../../hooks/use-user-contact-relays";
diff --git a/src/views/relays/mailboxes/index.tsx b/src/views/relays/mailboxes/index.tsx
index 989fb7130..c2bdcba48 100644
--- a/src/views/relays/mailboxes/index.tsx
+++ b/src/views/relays/mailboxes/index.tsx
@@ -1,7 +1,7 @@
import { useCallback } from "react";
import { Flex, Heading, IconButton, Link, Text } from "@chakra-ui/react";
import { CloseIcon } from "@chakra-ui/icons";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import RequireCurrentAccount from "../../../components/router/require-current-account";
diff --git a/src/views/relays/nip05/index.tsx b/src/views/relays/nip05/index.tsx
index 5309528d2..a22e2bb0c 100644
--- a/src/views/relays/nip05/index.tsx
+++ b/src/views/relays/nip05/index.tsx
@@ -2,7 +2,7 @@ import { Code, Flex, Heading, Link, Text } from "@chakra-ui/react";
import BackButton from "../../../components/router/back-button";
import useCurrentAccount from "../../../hooks/use-current-account";
import { useUserDNSIdentity } from "../../../hooks/use-user-dns-identity";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { RelayFavicon } from "../../../components/relay-favicon";
import SimpleView from "../../../components/layout/presets/simple-view";
diff --git a/src/views/relays/relay/index.tsx b/src/views/relays/relay/index.tsx
index 7ba95554c..fc17711ba 100644
--- a/src/views/relays/relay/index.tsx
+++ b/src/views/relays/relay/index.tsx
@@ -1,5 +1,5 @@
import { lazy, useMemo } from "react";
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import {
Button,
ButtonGroup,
diff --git a/src/views/relays/reviews.tsx b/src/views/relays/reviews.tsx
index 31d319b24..113b4e7b8 100644
--- a/src/views/relays/reviews.tsx
+++ b/src/views/relays/reviews.tsx
@@ -1,5 +1,5 @@
import { Button, Flex, Heading } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { useReadRelays } from "../../hooks/use-client-relays";
import useTimelineLoader from "../../hooks/use-timeline-loader";
diff --git a/src/views/relays/routes.tsx b/src/views/relays/routes.tsx
new file mode 100644
index 000000000..1c8548cfb
--- /dev/null
+++ b/src/views/relays/routes.tsx
@@ -0,0 +1,49 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const RelaysView = lazy(() => import("."));
+const AppRelaysView = lazy(() => import("./app"));
+const CacheRelayView = lazy(() => import("./cache"));
+const DatabaseView = lazy(() => import("./cache/database"));
+const MailboxesView = lazy(() => import("./mailboxes"));
+const SearchRelaysView = lazy(() => import("./search"));
+const MediaServersView = lazy(() => import("../settings/media-servers"));
+const NIP05RelaysView = lazy(() => import("./nip05"));
+const ContactListRelaysView = lazy(() => import("./contact-list"));
+const WebRtcRelaysView = lazy(() => import("./webrtc"));
+const WebRtcConnectView = lazy(() => import("./webrtc/connect"));
+const WebRtcPairView = lazy(() => import("./webrtc/pair"));
+const BrowseRelaySetsView = lazy(() => import("./browse-sets"));
+const RelaySetView = lazy(() => import("./relay-set"));
+
+export default [
+ {
+ element: ,
+ children: [
+ { index: true, element: },
+ { path: "app", element: },
+ {
+ path: "cache",
+ children: [
+ { index: true, element: },
+ { path: "database", element: },
+ ],
+ },
+ { path: "mailboxes", element: },
+ { path: "search", element: },
+ { path: "media-servers", element: },
+ { path: "nip05", element: },
+ { path: "contacts", element: },
+ {
+ path: "webrtc",
+ children: [
+ { index: true, element: },
+ { path: "connect", element: },
+ { path: "pair", element: },
+ ],
+ },
+ { path: "sets", element: },
+ { path: ":id", element: },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/relays/search/index.tsx b/src/views/relays/search/index.tsx
index 9f32a93ec..44ef67247 100644
--- a/src/views/relays/search/index.tsx
+++ b/src/views/relays/search/index.tsx
@@ -13,7 +13,7 @@ import {
Text,
useToast,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { EventTemplate, kinds } from "nostr-tools";
import dayjs from "dayjs";
import { CloseIcon } from "@chakra-ui/icons";
diff --git a/src/views/relays/webrtc/index.tsx b/src/views/relays/webrtc/index.tsx
index 8172ee1c9..34e146a96 100644
--- a/src/views/relays/webrtc/index.tsx
+++ b/src/views/relays/webrtc/index.tsx
@@ -1,6 +1,6 @@
import { useEffect } from "react";
import { Alert, AlertIcon, Button, ButtonGroup, Flex, Heading, Link, Text, useInterval } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import BackButton from "../../../components/router/back-button";
import webRtcRelaysService from "../../../services/webrtc-relays";
diff --git a/src/views/search/components/profile-results.tsx b/src/views/search/components/profile-results.tsx
index 783810e60..9b58a48e0 100644
--- a/src/views/search/components/profile-results.tsx
+++ b/src/views/search/components/profile-results.tsx
@@ -2,7 +2,7 @@ import { useMemo, useState } from "react";
import { useAsync } from "react-use";
import { nip19, NostrEvent } from "nostr-tools";
import { Button, ButtonGroup, Flex, LinkBox, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import UserAvatar from "../../../components/user/user-avatar";
import UserDnsIdentity from "../../../components/user/user-dns-identity";
diff --git a/src/views/search/index.tsx b/src/views/search/index.tsx
index fb765b43f..bd739469b 100644
--- a/src/views/search/index.tsx
+++ b/src/views/search/index.tsx
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo } from "react";
import { ButtonGroup, Flex, IconButton, Input, Select } from "@chakra-ui/react";
-import { useNavigate, useSearchParams, Link as RouterLink } from "react-router-dom";
+import { useNavigate, useSearchParams, Link as RouterLink } from "react-router";
import { AbstractRelay } from "nostr-tools/abstract-relay";
import { useForm } from "react-hook-form";
diff --git a/src/views/settings/accounts/index.tsx b/src/views/settings/accounts/index.tsx
index d3c1dde37..0625472f8 100644
--- a/src/views/settings/accounts/index.tsx
+++ b/src/views/settings/accounts/index.tsx
@@ -1,5 +1,5 @@
import { Box, Button, ButtonGroup, Divider, Flex, Heading, Text } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { PasswordSigner, SerialPortSigner, SimpleSigner } from "applesauce-signer";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/views/settings/bakery/connect/auth.tsx b/src/views/settings/bakery/connect/auth.tsx
index 514fd829b..581286d45 100644
--- a/src/views/settings/bakery/connect/auth.tsx
+++ b/src/views/settings/bakery/connect/auth.tsx
@@ -1,7 +1,7 @@
import { useEffect } from "react";
import { useForm } from "react-hook-form";
import { EventTemplate, VerifiedEvent } from "nostr-tools";
-import { Navigate, useLocation, useNavigate, useSearchParams } from "react-router-dom";
+import { Navigate, useLocation, useNavigate, useSearchParams } from "react-router";
import {
Button,
Checkbox,
diff --git a/src/views/settings/bakery/connect/index.tsx b/src/views/settings/bakery/connect/index.tsx
index eca68e8c1..f56f932a3 100644
--- a/src/views/settings/bakery/connect/index.tsx
+++ b/src/views/settings/bakery/connect/index.tsx
@@ -1,4 +1,4 @@
-import { Navigate, useLocation, useNavigate, useSearchParams } from "react-router-dom";
+import { Navigate, useLocation, useNavigate, useSearchParams } from "react-router";
import { Box, Button, Code, Flex, FormControl, FormLabel, Heading, Input, Text } from "@chakra-ui/react";
import { useForm } from "react-hook-form";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/views/settings/bakery/general-settings/index.tsx b/src/views/settings/bakery/general-settings/index.tsx
index e3f9e7856..9b87a9604 100644
--- a/src/views/settings/bakery/general-settings/index.tsx
+++ b/src/views/settings/bakery/general-settings/index.tsx
@@ -6,7 +6,7 @@ import { firstValueFrom } from "rxjs";
import { controlApi$, clearBakeryURL, bakery$ } from "../../../../services/bakery";
import SimpleView from "../../../../components/layout/presets/simple-view";
-import { Navigate } from "react-router-dom";
+import { Navigate } from "react-router";
function BakeryGeneralSettingsPage() {
const bakery = useObservable(bakery$);
diff --git a/src/views/settings/bakery/setup/index.tsx b/src/views/settings/bakery/setup/index.tsx
index 2640b19f7..12f279a59 100644
--- a/src/views/settings/bakery/setup/index.tsx
+++ b/src/views/settings/bakery/setup/index.tsx
@@ -1,7 +1,7 @@
import { Button, Flex, FormControl, FormHelperText, FormLabel, Heading, Input, useToast } from "@chakra-ui/react";
import { getPublicKey, nip19 } from "nostr-tools";
import { useForm } from "react-hook-form";
-import { Navigate } from "react-router-dom";
+import { Navigate } from "react-router";
import { isHexKey } from "applesauce-core/helpers";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/views/settings/display/index.tsx b/src/views/settings/display/index.tsx
index a3a6993e6..b04248db1 100644
--- a/src/views/settings/display/index.tsx
+++ b/src/views/settings/display/index.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
Flex,
FormControl,
diff --git a/src/views/settings/post/index.tsx b/src/views/settings/post/index.tsx
index 9b5f38f0c..843ccded3 100644
--- a/src/views/settings/post/index.tsx
+++ b/src/views/settings/post/index.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import {
Flex,
FormControl,
diff --git a/src/views/settings/routes.tsx b/src/views/settings/routes.tsx
new file mode 100644
index 000000000..da00cbc6f
--- /dev/null
+++ b/src/views/settings/routes.tsx
@@ -0,0 +1,75 @@
+import { lazy } from "react";
+import { Outlet, RouteObject } from "react-router";
+
+const SettingsView = lazy(() => import("."));
+const DisplaySettings = lazy(() => import("./display"));
+const RequireCurrentAccount = lazy(() => import("../../components/router/require-current-account"));
+const AccountSettings = lazy(() => import("./accounts"));
+const MailboxesView = lazy(() => import("../relays/mailboxes"));
+const MediaServersView = lazy(() => import("./media-servers"));
+const SearchRelaysView = lazy(() => import("../relays/search"));
+const AppRelaysView = lazy(() => import("../relays/app"));
+const CacheRelayView = lazy(() => import("../relays/cache"));
+const PostSettings = lazy(() => import("./post"));
+const PrivacySettings = lazy(() => import("./privacy"));
+const LightningSettings = lazy(() => import("./lightning"));
+const PerformanceSettings = lazy(() => import("./performance"));
+const BakeryConnectView = lazy(() => import("./bakery/connect"));
+const RequireBakery = lazy(() => import("../../components/router/require-bakery"));
+const BakeryGeneralSettingsView = lazy(() => import("./bakery/general-settings"));
+const BakeryAuthView = lazy(() => import("./bakery/connect/auth"));
+const NotificationSettingsView = lazy(() => import("./bakery/notifications"));
+const RequireBakeryAuth = lazy(() => import("../../components/router/require-bakery-auth"));
+const BakeryNetworkSettingsView = lazy(() => import("./bakery/network"));
+const BakeryServiceLogsView = lazy(() => import("./bakery/service-logs"));
+
+export default [
+ {
+ element: ,
+ children: [
+ { index: true, Component: DisplaySettings },
+ { path: "display", Component: DisplaySettings },
+ {
+ path: "accounts",
+ element: (
+
+
+
+ ),
+ },
+ { path: "mailboxes", Component: MailboxesView },
+ { path: "media-servers", Component: MediaServersView },
+ { path: "search-relays", Component: SearchRelaysView },
+ { path: "relays", Component: AppRelaysView },
+ { path: "cache", Component: CacheRelayView },
+ { path: "post", Component: PostSettings },
+ { path: "privacy", Component: PrivacySettings },
+ { path: "lightning", Component: LightningSettings },
+ { path: "performance", Component: PerformanceSettings },
+
+ { path: "bakery/connect", Component: BakeryConnectView },
+ {
+ path: "bakery",
+ element: (
+
+
+
+ ),
+ children: [
+ { index: true, Component: BakeryGeneralSettingsView },
+ { path: "auth", Component: BakeryAuthView },
+ { path: "notifications", Component: NotificationSettingsView },
+ {
+ path: "network",
+ element: (
+
+
+
+ ),
+ },
+ { path: "logs", Component: BakeryServiceLogsView },
+ ],
+ },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/signin/address/create.tsx b/src/views/signin/address/create.tsx
index 6c80b52cd..e24e280b6 100644
--- a/src/views/signin/address/create.tsx
+++ b/src/views/signin/address/create.tsx
@@ -15,7 +15,7 @@ import {
Text,
useToast,
} from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { NostrEvent } from "nostr-tools";
import { NostrConnectSigner } from "applesauce-signer/signers/nostr-connect-signer";
import { ProfileContent } from "applesauce-core/helpers";
diff --git a/src/views/signin/address/index.tsx b/src/views/signin/address/index.tsx
index 21fc33640..7701b45ff 100644
--- a/src/views/signin/address/index.tsx
+++ b/src/views/signin/address/index.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Card, CardProps, Flex, FormControl, FormLabel, Image, Input, Text, useToast } from "@chakra-ui/react";
-import { useNavigate, Link as RouterLink } from "react-router-dom";
+import { useNavigate, Link as RouterLink } from "react-router";
import { NostrConnectSigner } from "applesauce-signer/signers/nostr-connect-signer";
import { useDebounce } from "react-use";
diff --git a/src/views/signin/index.tsx b/src/views/signin/index.tsx
index 51a403734..c24db4e32 100644
--- a/src/views/signin/index.tsx
+++ b/src/views/signin/index.tsx
@@ -1,5 +1,5 @@
import { Avatar, Flex, Heading } from "@chakra-ui/react";
-import { Navigate, Outlet, useLocation } from "react-router-dom";
+import { Navigate, Outlet, useLocation } from "react-router";
import useCurrentAccount from "../../hooks/use-current-account";
export default function LoginView() {
diff --git a/src/views/signin/nostr-connect.tsx b/src/views/signin/nostr-connect.tsx
index 63f7241b8..2409a22f0 100644
--- a/src/views/signin/nostr-connect.tsx
+++ b/src/views/signin/nostr-connect.tsx
@@ -11,7 +11,7 @@ import {
useDisclosure,
useToast,
} from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { NostrConnectSigner } from "applesauce-signer/signers/nostr-connect-signer";
import accountService from "../../services/account";
diff --git a/src/views/signin/pubkey.tsx b/src/views/signin/npub.tsx
similarity index 97%
rename from src/views/signin/pubkey.tsx
rename to src/views/signin/npub.tsx
index 450afa006..7fa1de980 100644
--- a/src/views/signin/pubkey.tsx
+++ b/src/views/signin/npub.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Flex, FormControl, FormHelperText, FormLabel, Input, Link, useToast } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { normalizeToHexPubkey } from "../../helpers/nip19";
import accountService from "../../services/account";
diff --git a/src/views/signin/nsec.tsx b/src/views/signin/nsec.tsx
index 81fd7be4c..b1357dd8d 100644
--- a/src/views/signin/nsec.tsx
+++ b/src/views/signin/nsec.tsx
@@ -16,7 +16,7 @@ import {
Link,
} from "@chakra-ui/react";
import { generateSecretKey, getPublicKey, nip19 } from "nostr-tools";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { hexToBytes } from "@noble/hashes/utils";
import { useForm } from "react-hook-form";
import { decrypt } from "nostr-tools/nip49";
diff --git a/src/views/signin/routes.tsx b/src/views/signin/routes.tsx
new file mode 100644
index 000000000..72e735270
--- /dev/null
+++ b/src/views/signin/routes.tsx
@@ -0,0 +1,29 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const LoginView = lazy(() => import("."));
+const LoginStartView = lazy(() => import("./start"));
+const LoginNpubView = lazy(() => import("./npub"));
+const LoginNsecView = lazy(() => import("./nsec"));
+const LoginNostrAddressView = lazy(() => import("./address"));
+const LoginNostrAddressCreate = lazy(() => import("./address/create"));
+const LoginNostrConnectView = lazy(() => import("./nostr-connect"));
+
+export default [
+ {
+ element: ,
+ children: [
+ { path: "", element: },
+ { path: "npub", element: },
+ { path: "nsec", element: },
+ {
+ path: "address",
+ children: [
+ { path: "", element: },
+ { path: "create", element: },
+ ],
+ },
+ { path: "nostr-connect", element: },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/signin/start.tsx b/src/views/signin/start.tsx
index ef06062d7..302a89b99 100644
--- a/src/views/signin/start.tsx
+++ b/src/views/signin/start.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, ButtonGroup, Divider, Flex, IconButton, Link, Spinner, Text, useToast } from "@chakra-ui/react";
-import { Link as RouterLink, useLocation } from "react-router-dom";
+import { Link as RouterLink, useLocation } from "react-router";
import { AmberClipboardSigner, SerialPortSigner } from "applesauce-signer";
import Key01 from "../../components/icons/key-01";
diff --git a/src/views/signup/backup-step.tsx b/src/views/signup/components/backup-step.tsx
similarity index 97%
rename from src/views/signup/backup-step.tsx
rename to src/views/signup/components/backup-step.tsx
index 88c3b5f21..9bd664cb9 100644
--- a/src/views/signup/backup-step.tsx
+++ b/src/views/signup/components/backup-step.tsx
@@ -12,7 +12,7 @@ import {
import { nip19 } from "nostr-tools";
import { containerProps } from "./common";
-import { CopyIconButton } from "../../components/copy-icon-button";
+import { CopyIconButton } from "../../../components/copy-icon-button";
import styled from "@emotion/styled";
import { useState } from "react";
import { hexToBytes } from "@noble/hashes/utils";
diff --git a/src/views/signup/common.tsx b/src/views/signup/components/common.tsx
similarity index 100%
rename from src/views/signup/common.tsx
rename to src/views/signup/components/common.tsx
diff --git a/src/views/signup/create-step.tsx b/src/views/signup/components/create-step.tsx
similarity index 87%
rename from src/views/signup/create-step.tsx
rename to src/views/signup/components/create-step.tsx
index f812a155d..63f4a253a 100644
--- a/src/views/signup/create-step.tsx
+++ b/src/views/signup/components/create-step.tsx
@@ -5,12 +5,12 @@ import { bytesToHex } from "@noble/hashes/utils";
import { ProfileContent, unixNow } from "applesauce-core/helpers";
import { containerProps } from "./common";
-import { nostrBuildUploadImage } from "../../helpers/media-upload/nostr-build";
-import accountService from "../../services/account";
-import { COMMON_CONTACT_RELAYS } from "../../const";
-import { DraftNostrEvent } from "../../types/nostr-event";
-import { usePublishEvent } from "../../providers/global/publish-provider";
-import NsecAccount from "../../classes/accounts/nsec-account";
+import { nostrBuildUploadImage } from "../../../helpers/media-upload/nostr-build";
+import accountService from "../../../services/account";
+import { COMMON_CONTACT_RELAYS } from "../../../const";
+import { DraftNostrEvent } from "../../../types/nostr-event";
+import { usePublishEvent } from "../../../providers/global/publish-provider";
+import NsecAccount from "../../../classes/accounts/nsec-account";
export default function CreateStep({
metadata,
diff --git a/src/views/signup/finished-step.tsx b/src/views/signup/components/finished-step.tsx
similarity index 84%
rename from src/views/signup/finished-step.tsx
rename to src/views/signup/components/finished-step.tsx
index f2537a0ca..2452c974e 100644
--- a/src/views/signup/finished-step.tsx
+++ b/src/views/signup/components/finished-step.tsx
@@ -1,13 +1,13 @@
import { Button, Card, Flex, Heading, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { ProfileContent } from "applesauce-core/helpers";
import { useAsync } from "react-use";
-import UserAvatarLink from "../../components/user/user-avatar-link";
-import UserLink from "../../components/user/user-link";
+import UserAvatarLink from "../../../components/user/user-avatar-link";
+import UserLink from "../../../components/user/user-link";
import { containerProps } from "./common";
-import { UserFollowButton } from "../../components/user/user-follow-button";
-import UserDnsIdentity from "../../components/user/user-dns-identity";
+import { UserFollowButton } from "../../../components/user/user-follow-button";
+import UserDnsIdentity from "../../../components/user/user-dns-identity";
type TrendingApi = {
profiles: {
diff --git a/src/views/signup/name-step.tsx b/src/views/signup/components/name-step.tsx
similarity index 95%
rename from src/views/signup/name-step.tsx
rename to src/views/signup/components/name-step.tsx
index 3e8afb415..df856dfe1 100644
--- a/src/views/signup/name-step.tsx
+++ b/src/views/signup/components/name-step.tsx
@@ -1,7 +1,7 @@
import { Button, Flex, Heading, Input, Text, Textarea } from "@chakra-ui/react";
import { useForm } from "react-hook-form";
import { ProfileContent } from "applesauce-core/helpers";
-import { Link as RouterLink, useLocation } from "react-router-dom";
+import { Link as RouterLink, useLocation } from "react-router";
import { AppIcon, containerProps } from "./common";
diff --git a/src/views/signup/profile-image-step.tsx b/src/views/signup/components/profile-image-step.tsx
similarity index 95%
rename from src/views/signup/profile-image-step.tsx
rename to src/views/signup/components/profile-image-step.tsx
index 5f45925b8..2bf917cb2 100644
--- a/src/views/signup/profile-image-step.tsx
+++ b/src/views/signup/components/profile-image-step.tsx
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from "react";
import { Avatar, Button, Flex, Heading, VisuallyHiddenInput } from "@chakra-ui/react";
-import ImagePlus from "../../components/icons/image-plus";
+import ImagePlus from "../../../components/icons/image-plus";
import { containerProps } from "./common";
export default function ProfileImageStep({
diff --git a/src/views/signup/relay-step.tsx b/src/views/signup/components/relay-step.tsx
similarity index 94%
rename from src/views/signup/relay-step.tsx
rename to src/views/signup/components/relay-step.tsx
index 413e26e26..c822b29e8 100644
--- a/src/views/signup/relay-step.tsx
+++ b/src/views/signup/components/relay-step.tsx
@@ -1,8 +1,8 @@
import { Box, Button, Card, CardBody, Flex, Heading, SimpleGrid, Text } from "@chakra-ui/react";
import { useSet } from "react-use";
-import { useRelayInfo } from "../../hooks/use-relay-info";
-import { RelayFavicon } from "../../components/relay-favicon";
+import { useRelayInfo } from "../../../hooks/use-relay-info";
+import { RelayFavicon } from "../../../components/relay-favicon";
import { containerProps } from "./common";
function RelayButton({ url, selected, onClick }: { url: string; selected: boolean; onClick: () => void }) {
diff --git a/src/views/signup/index.tsx b/src/views/signup/index.tsx
index 85c32b13a..ddafd3268 100644
--- a/src/views/signup/index.tsx
+++ b/src/views/signup/index.tsx
@@ -1,14 +1,14 @@
import { useState } from "react";
import { Flex } from "@chakra-ui/react";
-import { useNavigate, useParams } from "react-router-dom";
+import { useNavigate, useParams } from "react-router";
import { ProfileContent } from "applesauce-core/helpers";
-import NameStep from "./name-step";
-import ProfileImageStep from "./profile-image-step";
-import RelayStep from "./relay-step";
-import CreateStep from "./create-step";
-import BackupStep from "./backup-step";
-import FinishedStep from "./finished-step";
+import NameStep from "./components/name-step";
+import ProfileImageStep from "./components/profile-image-step";
+import RelayStep from "./components/relay-step";
+import CreateStep from "./components/create-step";
+import BackupStep from "./components/backup-step";
+import FinishedStep from "./components/finished-step";
export default function SignupView() {
const step = useParams().step || "name";
diff --git a/src/views/signup/routes.tsx b/src/views/signup/routes.tsx
new file mode 100644
index 000000000..8d371204d
--- /dev/null
+++ b/src/views/signup/routes.tsx
@@ -0,0 +1,14 @@
+import { RouteObject } from "react-router";
+
+import SignupView from ".";
+
+export default [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ path: ":step",
+ element: ,
+ },
+] satisfies RouteObject[];
diff --git a/src/views/streams/components/stream-card.tsx b/src/views/streams/components/stream-card.tsx
index ac2681e7a..9976cd3bf 100644
--- a/src/views/streams/components/stream-card.tsx
+++ b/src/views/streams/components/stream-card.tsx
@@ -12,7 +12,7 @@ import {
LinkOverlay,
} from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import UserAvatar from "../../../components/user/user-avatar";
import UserLink from "../../../components/user/user-link";
diff --git a/src/views/streams/components/stream-goal.tsx b/src/views/streams/components/stream-goal.tsx
index 87b0e8f96..7d57f372e 100644
--- a/src/views/streams/components/stream-goal.tsx
+++ b/src/views/streams/components/stream-goal.tsx
@@ -1,4 +1,4 @@
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { Card, CardBody, CardHeader, CardProps, Flex, Heading, Link } from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
diff --git a/src/views/streams/dashboard/index.tsx b/src/views/streams/dashboard/index.tsx
index f0b94f6c3..c1d559f65 100644
--- a/src/views/streams/dashboard/index.tsx
+++ b/src/views/streams/dashboard/index.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import { Button, Flex, Select } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { kinds, NostrEvent } from "nostr-tools";
import { getEventUID } from "applesauce-core/helpers";
diff --git a/src/views/streams/index.tsx b/src/views/streams/index.tsx
index 21eaf0d38..dd5301b4a 100644
--- a/src/views/streams/index.tsx
+++ b/src/views/streams/index.tsx
@@ -109,7 +109,7 @@ function StreamsPage() {
);
}
-export default function StreamsView() {
+export default function StreamHomeView() {
return (
;
diff --git a/src/views/task-manager/provider.tsx b/src/views/task-manager/provider.tsx
index a8b2a465b..40669254b 100644
--- a/src/views/task-manager/provider.tsx
+++ b/src/views/task-manager/provider.tsx
@@ -1,5 +1,5 @@
import { PropsWithChildren, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
-import { Router, Location, To, createMemoryRouter, RouteObject } from "react-router-dom";
+import { Router, Location, To, createMemoryRouter, RouteObject } from "react-router";
import { logger } from "../../helpers/debug";
import InspectRelayView from "./relays/inspect-relay";
diff --git a/src/views/task-manager/publish-log/entry-details.tsx b/src/views/task-manager/publish-log/entry-details.tsx
index c327bd73a..79920eeaf 100644
--- a/src/views/task-manager/publish-log/entry-details.tsx
+++ b/src/views/task-manager/publish-log/entry-details.tsx
@@ -10,7 +10,7 @@ import {
Progress,
Spinner,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { OkPacketAgainstEvent } from "rx-nostr";
diff --git a/src/views/task-manager/relays/index.tsx b/src/views/task-manager/relays/index.tsx
index f78c0f27a..08688fe0e 100644
--- a/src/views/task-manager/relays/index.tsx
+++ b/src/views/task-manager/relays/index.tsx
@@ -18,7 +18,7 @@ import {
Text,
useInterval,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useLocalStorage } from "react-use";
import { AbstractRelay } from "nostr-tools/abstract-relay";
import { useObservable } from "applesauce-react/hooks";
diff --git a/src/views/task-manager/relays/inspect-relay.tsx b/src/views/task-manager/relays/inspect-relay.tsx
index 0286e7861..1fd7bcf8e 100644
--- a/src/views/task-manager/relays/inspect-relay.tsx
+++ b/src/views/task-manager/relays/inspect-relay.tsx
@@ -12,7 +12,7 @@ import {
Text,
useInterval,
} from "@chakra-ui/react";
-import { useParams } from "react-router-dom";
+import { useParams } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import VerticalPageLayout from "../../../components/vertical-page-layout";
diff --git a/src/views/thread/components/thread-post.tsx b/src/views/thread/components/thread-post.tsx
index 3089adf94..b78cd7d29 100644
--- a/src/views/thread/components/thread-post.tsx
+++ b/src/views/thread/components/thread-post.tsx
@@ -1,6 +1,6 @@
import { memo, useState } from "react";
import { Alert, AlertIcon, Button, ButtonGroup, Flex, IconButton, Link, Spacer, useDisclosure } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { ThreadItem } from "applesauce-core/queries";
import ReplyForm from "./reply-form";
diff --git a/src/views/thread/index.tsx b/src/views/thread/index.tsx
index 9579bfa4a..cc9252b31 100644
--- a/src/views/thread/index.tsx
+++ b/src/views/thread/index.tsx
@@ -1,6 +1,6 @@
import { ReactNode } from "react";
import { Card, Heading, Link, Spinner } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { Thread, ThreadQuery } from "applesauce-core/queries";
import { useStoreQuery } from "applesauce-react/hooks";
import { nip19 } from "nostr-tools";
diff --git a/src/views/tools/dm-timeline.tsx b/src/views/tools/dm-timeline.tsx
index ad34a8482..633f7539d 100644
--- a/src/views/tools/dm-timeline.tsx
+++ b/src/views/tools/dm-timeline.tsx
@@ -1,7 +1,7 @@
import { Button, Flex } from "@chakra-ui/react";
import { memo, useCallback } from "react";
import { kinds } from "nostr-tools";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import VerticalPageLayout from "../../components/vertical-page-layout";
import PeopleListProvider, { usePeopleListContext } from "../../providers/local/people-list-provider";
diff --git a/src/views/tools/event-console/index.tsx b/src/views/tools/event-console/index.tsx
index e909b5e76..b23caaccd 100644
--- a/src/views/tools/event-console/index.tsx
+++ b/src/views/tools/event-console/index.tsx
@@ -21,7 +21,7 @@ import { useLocalStorage } from "react-use";
import { Subscription as IDBSubscription } from "nostr-idb";
import _throttle from "lodash.throttle";
import stringify from "json-stringify-deterministic";
-import { useLocation, useSearchParams } from "react-router-dom";
+import { useLocation, useSearchParams } from "react-router";
import VerticalPageLayout from "../../../components/vertical-page-layout";
import BackButton from "../../../components/router/back-button";
diff --git a/src/views/tools/index.tsx b/src/views/tools/index.tsx
index 8a62383c2..3b83dfb56 100644
--- a/src/views/tools/index.tsx
+++ b/src/views/tools/index.tsx
@@ -1,4 +1,4 @@
-import { Navigate } from "react-router-dom";
+import { Navigate } from "react-router";
export default function ToolsHomeView() {
return ;
diff --git a/src/views/tools/network-dm-graph.tsx b/src/views/tools/network-dm-graph.tsx
index 3762f367f..c1da85348 100644
--- a/src/views/tools/network-dm-graph.tsx
+++ b/src/views/tools/network-dm-graph.tsx
@@ -4,7 +4,7 @@ import AutoSizer from "react-virtualized-auto-sizer";
import ForceGraph, { LinkObject, NodeObject } from "react-force-graph-3d";
import { Filter, kinds } from "nostr-tools";
import dayjs from "dayjs";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { useDebounce, useObservable } from "react-use";
import {
Group,
diff --git a/src/views/tools/network-mute-graph.tsx b/src/views/tools/network-mute-graph.tsx
index bf5e960bf..3364d2d3c 100644
--- a/src/views/tools/network-mute-graph.tsx
+++ b/src/views/tools/network-mute-graph.tsx
@@ -1,7 +1,7 @@
import { useMemo } from "react";
import { Box, Button, Flex, Text } from "@chakra-ui/react";
import AutoSizer from "react-virtualized-auto-sizer";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import ForceGraph, { LinkObject, NodeObject } from "react-force-graph-3d";
import { Mesh, MeshBasicMaterial, SRGBColorSpace, SphereGeometry, Sprite, SpriteMaterial, TextureLoader } from "three";
import { kinds } from "nostr-tools";
@@ -121,7 +121,7 @@ function NetworkGraphPage() {
);
}
-export default function NetworkGraphView() {
+export default function NetworkMuteGraphView() {
return (
diff --git a/src/views/tools/routes.tsx b/src/views/tools/routes.tsx
new file mode 100644
index 000000000..db3d18955
--- /dev/null
+++ b/src/views/tools/routes.tsx
@@ -0,0 +1,26 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const ToolsHomeView = lazy(() => import("."));
+const NetworkDMGraphView = lazy(() => import("./network-dm-graph"));
+const DMTimelineView = lazy(() => import("./dm-timeline"));
+const TransformNoteView = lazy(() => import("./transform-note"));
+const UnknownTimelineView = lazy(() => import("./unknown-event-feed"));
+const EventConsoleView = lazy(() => import("./event-console"));
+const CorrectionsFeedView = lazy(() => import("./corrections"));
+const NoStrudelUsersView = lazy(() => import("./nostrudel-users"));
+const EventPublisherView = lazy(() => import("./event-publisher"));
+const NetworkMuteGraphView = lazy(() => import("./network-mute-graph"));
+
+export default [
+ { index: true, Component: ToolsHomeView },
+ { path: "network-mute-graph", Component: NetworkMuteGraphView },
+ { path: "network-dm-graph", Component: NetworkDMGraphView },
+ { path: "dm-timeline", Component: DMTimelineView },
+ { path: "transform/:id", Component: TransformNoteView },
+ { path: "unknown", Component: UnknownTimelineView },
+ { path: "console", Component: EventConsoleView },
+ { path: "corrections", Component: CorrectionsFeedView },
+ { path: "nostrudel-users", Component: NoStrudelUsersView },
+ { path: "publisher", Component: EventPublisherView },
+] satisfies RouteObject[];
diff --git a/src/views/tools/unknown-event-feed.tsx b/src/views/tools/unknown-event-feed.tsx
index e10987e95..0daaac504 100644
--- a/src/views/tools/unknown-event-feed.tsx
+++ b/src/views/tools/unknown-event-feed.tsx
@@ -1,6 +1,6 @@
import { Button, Flex } from "@chakra-ui/react";
import { memo, useCallback } from "react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { kinds } from "nostr-tools";
import VerticalPageLayout from "../../components/vertical-page-layout";
diff --git a/src/views/torrents/components/torrent-table-row.tsx b/src/views/torrents/components/torrent-table-row.tsx
index 70a564e8a..416b5c104 100644
--- a/src/views/torrents/components/torrent-table-row.tsx
+++ b/src/views/torrents/components/torrent-table-row.tsx
@@ -1,6 +1,6 @@
import { memo, useMemo } from "react";
import { ButtonGroup, IconButton, Link, Td, Tr } from "@chakra-ui/react";
-import { Link as RouterLink, useLocation } from "react-router-dom";
+import { Link as RouterLink, useLocation } from "react-router";
import { getTorrentMagnetLink, getTorrentSize, getTorrentTitle } from "../../../helpers/nostr/torrents";
import { NostrEvent } from "../../../types/nostr-event";
diff --git a/src/views/torrents/index.tsx b/src/views/torrents/index.tsx
index 7becce17e..de5916fab 100644
--- a/src/views/torrents/index.tsx
+++ b/src/views/torrents/index.tsx
@@ -1,6 +1,6 @@
import { ChangeEventHandler, useCallback, useMemo, useState } from "react";
import { Alert, Button, Flex, Spacer, Table, TableContainer, Tbody, Th, Thead, Tr, useToast } from "@chakra-ui/react";
-import { Link as RouterLink, useNavigate } from "react-router-dom";
+import { Link as RouterLink, useNavigate } from "react-router";
import PeopleListSelection from "../../components/people-list-selection/people-list-selection";
import VerticalPageLayout from "../../components/vertical-page-layout";
diff --git a/src/views/torrents/new.tsx b/src/views/torrents/new.tsx
index e8a8bd0bc..f9974355a 100644
--- a/src/views/torrents/new.tsx
+++ b/src/views/torrents/new.tsx
@@ -30,7 +30,7 @@ import VerticalPageLayout from "../../components/vertical-page-layout";
import { Category, TORRENT_KIND, torrentCatagories } from "../../helpers/nostr/torrents";
import { useBreakpointValue } from "../../providers/global/breakpoint-provider";
import { DraftNostrEvent } from "../../types/nostr-event";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { nip19 } from "nostr-tools";
import { usePublishEvent } from "../../providers/global/publish-provider";
diff --git a/src/views/torrents/routes.tsx b/src/views/torrents/routes.tsx
new file mode 100644
index 000000000..a6d3fc467
--- /dev/null
+++ b/src/views/torrents/routes.tsx
@@ -0,0 +1,12 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const TorrentsView = lazy(() => import("."));
+const NewTorrentView = lazy(() => import("./new"));
+const TorrentDetailsView = lazy(() => import("./torrent"));
+
+export default [
+ { index: true, Component: TorrentsView },
+ { path: "new", Component: NewTorrentView },
+ { path: ":id", Component: TorrentDetailsView },
+] satisfies RouteObject[];
diff --git a/src/views/user/about/index.tsx b/src/views/user/about/index.tsx
index e4b369adc..5b70c7e4e 100644
--- a/src/views/user/about/index.tsx
+++ b/src/views/user/about/index.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext, Link as RouterLink } from "react-router-dom";
+import { useOutletContext, Link as RouterLink } from "react-router";
import {
Box,
Button,
diff --git a/src/views/user/about/user-profile-badges.tsx b/src/views/user/about/user-profile-badges.tsx
index 77662dab0..29997c05e 100644
--- a/src/views/user/about/user-profile-badges.tsx
+++ b/src/views/user/about/user-profile-badges.tsx
@@ -17,7 +17,7 @@ import {
Tooltip,
useDisclosure,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import useUserProfileBadges from "../../../hooks/use-user-profile-badges";
import { getBadgeDescription, getBadgeImage, getBadgeName } from "../../../helpers/nostr/badges";
diff --git a/src/views/user/about/user-recent-events.tsx b/src/views/user/about/user-recent-events.tsx
index 363a7cd32..e9121f006 100644
--- a/src/views/user/about/user-recent-events.tsx
+++ b/src/views/user/about/user-recent-events.tsx
@@ -1,6 +1,6 @@
import { Badge, Button, ButtonProps, ComponentWithAs, Flex, IconProps, useDisclosure } from "@chakra-ui/react";
import { Filter, kinds, nip19, NostrEvent } from "nostr-tools";
-import { Link as RouteLink, To } from "react-router-dom";
+import { Link as RouteLink, To } from "react-router";
import {
ArticleIcon,
diff --git a/src/views/user/articles.tsx b/src/views/user/articles.tsx
index 7c3f12fe4..ae073253c 100644
--- a/src/views/user/articles.tsx
+++ b/src/views/user/articles.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { kinds } from "nostr-tools";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/components/header.tsx b/src/views/user/components/header.tsx
index ff18fa92f..274e1e860 100644
--- a/src/views/user/components/header.tsx
+++ b/src/views/user/components/header.tsx
@@ -1,5 +1,5 @@
import { Flex, Heading, IconButton, Spacer } from "@chakra-ui/react";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
import { EditIcon, GhostIcon } from "../../../components/icons";
import UserAvatar from "../../../components/user/user-avatar";
diff --git a/src/views/user/components/user-profile-menu.tsx b/src/views/user/components/user-profile-menu.tsx
index 89ff6e8bf..fe90855ea 100644
--- a/src/views/user/components/user-profile-menu.tsx
+++ b/src/views/user/components/user-profile-menu.tsx
@@ -1,5 +1,5 @@
import { MenuItem, useDisclosure, useToast } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { nip19 } from "nostr-tools";
import { DotsMenuButton, MenuIconButtonProps } from "../../../components/dots-menu-button";
diff --git a/src/views/user/emoji-packs.tsx b/src/views/user/emoji-packs.tsx
index 7851d1357..caa87636b 100644
--- a/src/views/user/emoji-packs.tsx
+++ b/src/views/user/emoji-packs.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Heading, SimpleGrid } from "@chakra-ui/react";
import { kinds } from "nostr-tools";
@@ -7,7 +7,7 @@ import useTimelineLoader from "../../hooks/use-timeline-loader";
import { getEventUID } from "../../helpers/nostr/event";
import IntersectionObserverProvider from "../../providers/local/intersection-observer";
import { useTimelineCurserIntersectionCallback } from "../../hooks/use-timeline-cursor-intersection-callback";
-import EmojiPackCard from "../emoji-packs/components/emoji-pack-card";
+import EmojiPackCard from "../emojis/components/emoji-pack-card";
import { getPackCordsFromFavorites } from "../../helpers/nostr/emoji-packs";
import useFavoriteEmojiPacks from "../../hooks/use-favorite-emoji-packs";
import useReplaceableEvents from "../../hooks/use-replaceable-events";
diff --git a/src/views/user/files.tsx b/src/views/user/files.tsx
index 0ad08f775..ea270f9eb 100644
--- a/src/views/user/files.tsx
+++ b/src/views/user/files.tsx
@@ -1,6 +1,6 @@
import { Link, Table, TableContainer, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
import { getTagValue } from "applesauce-core/helpers";
-import { useOutletContext, Link as RouterLink } from "react-router-dom";
+import { useOutletContext, Link as RouterLink } from "react-router";
import { kinds } from "nostr-tools";
import useTimelineLoader from "../../hooks/use-timeline-loader";
diff --git a/src/views/user/followers.tsx b/src/views/user/followers.tsx
index a119b766e..cfcdf05b1 100644
--- a/src/views/user/followers.tsx
+++ b/src/views/user/followers.tsx
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import { Flex, SimpleGrid } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Event, kinds } from "nostr-tools";
import { useReadRelays } from "../../hooks/use-client-relays";
diff --git a/src/views/user/following.tsx b/src/views/user/following.tsx
index acc140cf1..70e503225 100644
--- a/src/views/user/following.tsx
+++ b/src/views/user/following.tsx
@@ -1,5 +1,5 @@
import { SimpleGrid, Spinner } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { UserCard } from "./components/user-card";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/goals.tsx b/src/views/user/goals.tsx
index cf15a3560..cca2ead7d 100644
--- a/src/views/user/goals.tsx
+++ b/src/views/user/goals.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { SimpleGrid } from "@chakra-ui/react";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/index.tsx b/src/views/user/index.tsx
index dd355d3ec..8682ba0aa 100644
--- a/src/views/user/index.tsx
+++ b/src/views/user/index.tsx
@@ -25,8 +25,8 @@ import {
Tabs,
useDisclosure,
} from "@chakra-ui/react";
+import { Outlet, useMatches, useNavigate } from "react-router";
-import { Outlet, useMatches, useNavigate } from "react-router-dom";
import useUserProfile from "../../hooks/use-user-profile";
import { getDisplayName } from "../../helpers/nostr/profile";
import { useAppTitle } from "../../hooks/use-app-title";
@@ -69,7 +69,7 @@ function useUserBestOutbox(pubkey: string, count: number = 4) {
return !count ? sorted : sorted.slice(0, count);
}
-const UserView = () => {
+export default function UserView() {
const { pubkey, relays: pointerRelays = [] } = useParamsProfilePointer();
const navigate = useNavigate();
const [relayCount, setRelayCount] = useState(4);
@@ -154,6 +154,4 @@ const UserView = () => {
>
);
-};
-
-export default UserView;
+}
diff --git a/src/views/user/lists.tsx b/src/views/user/lists.tsx
index 469e38cb3..c3623322a 100644
--- a/src/views/user/lists.tsx
+++ b/src/views/user/lists.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Heading, SimpleGrid } from "@chakra-ui/react";
import { getEventUID } from "applesauce-core/helpers";
import { kinds } from "nostr-tools";
@@ -16,12 +16,14 @@ export default function UserListsTab() {
const genericSets = sets.filter((event) => event.pubkey === pubkey && event.kind === kinds.Genericlists);
const bookmarkSets = sets.filter((event) => event.pubkey === pubkey && event.kind === kinds.Bookmarksets);
+ const columns = { base: 1, lg: 2, xl: 3, "2xl": 4 };
+
return (
Special lists
-
+
@@ -35,7 +37,7 @@ export default function UserListsTab() {
People lists
-
+
{followSets.map((set) => (
))}
@@ -48,7 +50,7 @@ export default function UserListsTab() {
Generic lists
-
+
{genericSets.map((set) => (
))}
@@ -61,7 +63,7 @@ export default function UserListsTab() {
Bookmark sets
-
+
{bookmarkSets.map((set) => (
))}
diff --git a/src/views/user/media-posts.tsx b/src/views/user/media-posts.tsx
index 650d89b2c..26069fcf8 100644
--- a/src/views/user/media-posts.tsx
+++ b/src/views/user/media-posts.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
import useTimelineLoader from "../../hooks/use-timeline-loader";
diff --git a/src/views/user/messages.tsx b/src/views/user/messages.tsx
index a00040162..52e03a366 100644
--- a/src/views/user/messages.tsx
+++ b/src/views/user/messages.tsx
@@ -1,6 +1,6 @@
import { Flex, Table, TableContainer, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
import { kinds } from "nostr-tools";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import useTimelineLoader from "../../hooks/use-timeline-loader";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/muted-by.tsx b/src/views/user/muted-by.tsx
index 9a9476cce..5bfe3f322 100644
--- a/src/views/user/muted-by.tsx
+++ b/src/views/user/muted-by.tsx
@@ -1,6 +1,6 @@
import { memo, useMemo } from "react";
import { Flex, Heading, Link, SimpleGrid } from "@chakra-ui/react";
-import { Link as RouterLink, useOutletContext } from "react-router-dom";
+import { Link as RouterLink, useOutletContext } from "react-router";
import { kinds } from "nostr-tools";
import UserAvatarLink from "../../components/user/user-avatar-link";
diff --git a/src/views/user/notes.tsx b/src/views/user/notes.tsx
index 2ddd505ec..024cb0913 100644
--- a/src/views/user/notes.tsx
+++ b/src/views/user/notes.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Flex, Spacer } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { kinds } from "nostr-tools";
import { isReply, isRepost } from "../../helpers/nostr/event";
diff --git a/src/views/user/reactions.tsx b/src/views/user/reactions.tsx
index 8ef4f9532..7f6528a56 100644
--- a/src/views/user/reactions.tsx
+++ b/src/views/user/reactions.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Box, Flex, Spacer, Text } from "@chakra-ui/react";
import { nip25 } from "nostr-tools";
diff --git a/src/views/user/relays.tsx b/src/views/user/relays.tsx
index 0bc1e1569..b8dcf012c 100644
--- a/src/views/user/relays.tsx
+++ b/src/views/user/relays.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext, Link as RouterLink } from "react-router-dom";
+import { useOutletContext, Link as RouterLink } from "react-router";
import { Button, Flex, Heading, Spacer, StackDivider, Tag, VStack } from "@chakra-ui/react";
import useTimelineLoader from "../../hooks/use-timeline-loader";
diff --git a/src/views/user/reports.tsx b/src/views/user/reports.tsx
index ec0653162..8bc99ce2e 100644
--- a/src/views/user/reports.tsx
+++ b/src/views/user/reports.tsx
@@ -1,5 +1,5 @@
import { Flex, Text } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { kinds } from "nostr-tools";
import { NoteLink } from "../../components/note/note-link";
diff --git a/src/views/user/routes.tsx b/src/views/user/routes.tsx
new file mode 100644
index 000000000..e4987368e
--- /dev/null
+++ b/src/views/user/routes.tsx
@@ -0,0 +1,53 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const UserView = lazy(() => import("."));
+const UserAboutTab = lazy(() => import("./about"));
+const UserNotesTab = lazy(() => import("./notes"));
+const UserArticlesTab = lazy(() => import("./articles"));
+const UserMediaPostsTab = lazy(() => import("./media-posts"));
+const UserStreamsTab = lazy(() => import("./streams"));
+const UserTracksTab = lazy(() => import("./tracks"));
+const UserFilesTab = lazy(() => import("./files"));
+const UserVideosTab = lazy(() => import("./videos"));
+const UserZapsTab = lazy(() => import("./zaps"));
+const UserReactionsTab = lazy(() => import("./reactions"));
+const UserListsTab = lazy(() => import("./lists"));
+const UserFollowersTab = lazy(() => import("./followers"));
+const UserFollowingTab = lazy(() => import("./following"));
+const UserGoalsTab = lazy(() => import("./goals"));
+const UserEmojiPacksTab = lazy(() => import("./emoji-packs"));
+const UserRelaysTab = lazy(() => import("./relays"));
+const UserReportsTab = lazy(() => import("./reports"));
+const UserMutedByTab = lazy(() => import("./muted-by"));
+const UserMessagesTab = lazy(() => import("./messages"));
+const UserTorrentsTab = lazy(() => import("./torrents"));
+
+export default [
+ {
+ Component: UserView,
+ children: [
+ { index: true, Component: UserAboutTab },
+ { path: "about", Component: UserAboutTab },
+ { path: "notes", Component: UserNotesTab },
+ { path: "articles", Component: UserArticlesTab },
+ { path: "media", Component: UserMediaPostsTab },
+ { path: "streams", Component: UserStreamsTab },
+ { path: "tracks", Component: UserTracksTab },
+ { path: "videos", Component: UserVideosTab },
+ { path: "files", Component: UserFilesTab },
+ { path: "zaps", Component: UserZapsTab },
+ { path: "reactions", Component: UserReactionsTab },
+ { path: "lists", Component: UserListsTab },
+ { path: "followers", Component: UserFollowersTab },
+ { path: "following", Component: UserFollowingTab },
+ { path: "goals", Component: UserGoalsTab },
+ { path: "emojis", Component: UserEmojiPacksTab },
+ { path: "relays", Component: UserRelaysTab },
+ { path: "reports", Component: UserReportsTab },
+ { path: "muted-by", Component: UserMutedByTab },
+ { path: "dms", Component: UserMessagesTab },
+ { path: "torrents", Component: UserTorrentsTab },
+ ],
+ },
+] satisfies RouteObject[];
diff --git a/src/views/user/streams.tsx b/src/views/user/streams.tsx
index 6d50f15e4..83701f52f 100644
--- a/src/views/user/streams.tsx
+++ b/src/views/user/streams.tsx
@@ -1,5 +1,5 @@
import { SimpleGrid } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { kinds } from "nostr-tools";
import { getEventUID } from "applesauce-core/helpers";
diff --git a/src/views/user/torrents.tsx b/src/views/user/torrents.tsx
index 12c249ccb..d8b194cc6 100644
--- a/src/views/user/torrents.tsx
+++ b/src/views/user/torrents.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { Table, TableContainer, Tbody, Th, Thead, Tr } from "@chakra-ui/react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import useTimelineLoader from "../../hooks/use-timeline-loader";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/tracks.tsx b/src/views/user/tracks.tsx
index 6efec6db0..3f8d156f4 100644
--- a/src/views/user/tracks.tsx
+++ b/src/views/user/tracks.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Box, SimpleGrid } from "@chakra-ui/react";
import { useAdditionalRelayContext } from "../../providers/local/additional-relay-context";
diff --git a/src/views/user/videos.tsx b/src/views/user/videos.tsx
index 1e2f9991f..95fc17714 100644
--- a/src/views/user/videos.tsx
+++ b/src/views/user/videos.tsx
@@ -1,4 +1,4 @@
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { SimpleGrid } from "@chakra-ui/react";
import { getEventUID } from "applesauce-core/helpers";
diff --git a/src/views/user/zaps.tsx b/src/views/user/zaps.tsx
index b801092d0..28d163e91 100644
--- a/src/views/user/zaps.tsx
+++ b/src/views/user/zaps.tsx
@@ -1,5 +1,5 @@
import { ReactNode, useCallback, useMemo, useState } from "react";
-import { useOutletContext } from "react-router-dom";
+import { useOutletContext } from "react-router";
import { Box, Flex, Select, Text } from "@chakra-ui/react";
import { useRenderedContent } from "applesauce-react/hooks";
import { getZapPayment, getZapRequest } from "applesauce-core/helpers";
diff --git a/src/views/videos/components/video-card.tsx b/src/views/videos/components/video-card.tsx
index 4ff93c4ec..9186ed9e7 100644
--- a/src/views/videos/components/video-card.tsx
+++ b/src/views/videos/components/video-card.tsx
@@ -1,5 +1,5 @@
import { Box, Card, CardBody, CardHeader, CardProps, Heading, LinkBox, Text } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "../../../types/nostr-event";
import { getVideoImages, getVideoSummary, getVideoTitle } from "../../../helpers/nostr/video";
diff --git a/src/views/videos/routes.tsx b/src/views/videos/routes.tsx
new file mode 100644
index 000000000..efc0a7762
--- /dev/null
+++ b/src/views/videos/routes.tsx
@@ -0,0 +1,16 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const VideosView = lazy(() => import("."));
+const VideoDetailsView = lazy(() => import("./video"));
+
+export default [
+ {
+ index: true,
+ Component: VideosView,
+ },
+ {
+ path: ":naddr",
+ Component: VideoDetailsView,
+ },
+] satisfies RouteObject[];
diff --git a/src/views/wallet/index.tsx b/src/views/wallet/index.tsx
index dbe6ccbfd..1163173e6 100644
--- a/src/views/wallet/index.tsx
+++ b/src/views/wallet/index.tsx
@@ -52,7 +52,7 @@ function Wallet({ wallet }: { wallet: NostrEvent }) {
);
}
-export default function WalletView() {
+export default function WalletHomeView() {
const account = useCurrentAccount()!;
const readRelays = useReadRelays();
diff --git a/src/views/wallet/routes.tsx b/src/views/wallet/routes.tsx
new file mode 100644
index 000000000..ede03a43a
--- /dev/null
+++ b/src/views/wallet/routes.tsx
@@ -0,0 +1,16 @@
+import { RouteObject } from "react-router";
+import RequireCurrentAccount from "../../components/router/require-current-account";
+import { lazy } from "react";
+
+const WalletHomeView = lazy(() => import("."));
+
+export default [
+ {
+ index: true,
+ element: (
+
+
+
+ ),
+ },
+] satisfies RouteObject[];
diff --git a/src/views/wiki/compare.tsx b/src/views/wiki/compare.tsx
index d84c605ae..52280624d 100644
--- a/src/views/wiki/compare.tsx
+++ b/src/views/wiki/compare.tsx
@@ -11,7 +11,7 @@ import {
Spinner,
Text,
} from "@chakra-ui/react";
-import { Navigate, useParams, Link as RouterLink } from "react-router-dom";
+import { Navigate, useParams, Link as RouterLink } from "react-router";
import useReplaceableEvent from "../../hooks/use-replaceable-event";
import VerticalPageLayout from "../../components/vertical-page-layout";
diff --git a/src/views/wiki/components/wiki-page-header.tsx b/src/views/wiki/components/wiki-page-header.tsx
index a8f991aab..f4785409d 100644
--- a/src/views/wiki/components/wiki-page-header.tsx
+++ b/src/views/wiki/components/wiki-page-header.tsx
@@ -1,5 +1,5 @@
import { Flex, Heading, Link } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import WikiSearchForm from "./wiki-search-form";
diff --git a/src/views/wiki/components/wiki-page-menu.tsx b/src/views/wiki/components/wiki-page-menu.tsx
index c3734519b..705d4b730 100644
--- a/src/views/wiki/components/wiki-page-menu.tsx
+++ b/src/views/wiki/components/wiki-page-menu.tsx
@@ -1,5 +1,5 @@
import { NostrEvent } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { MenuItem } from "@chakra-ui/react";
import { DotsMenuButton, MenuIconButtonProps } from "../../../components/dots-menu-button";
diff --git a/src/views/wiki/components/wiki-page-result.tsx b/src/views/wiki/components/wiki-page-result.tsx
index 04b4fe430..1ff927cfd 100644
--- a/src/views/wiki/components/wiki-page-result.tsx
+++ b/src/views/wiki/components/wiki-page-result.tsx
@@ -1,7 +1,7 @@
import { useMemo } from "react";
import { Box, Button, ButtonGroup, Flex, Heading, LinkBox, Text } from "@chakra-ui/react";
import { NostrEvent, nip19 } from "nostr-tools";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import HoverLinkOverlay from "../../../components/hover-link-overlay";
import { getPageForks, getPageSummary, getPageTitle, getPageTopic } from "../../../helpers/nostr/wiki";
diff --git a/src/views/wiki/components/wiki-search-form.tsx b/src/views/wiki/components/wiki-search-form.tsx
index 000b4767c..0337c3469 100644
--- a/src/views/wiki/components/wiki-search-form.tsx
+++ b/src/views/wiki/components/wiki-search-form.tsx
@@ -1,6 +1,6 @@
import { Button, Flex, FlexProps, Input } from "@chakra-ui/react";
import { useForm } from "react-hook-form";
-import { useNavigate } from "react-router-dom";
+import { useNavigate } from "react-router";
export default function WikiSearchForm({ ...props }: Omit) {
const navigate = useNavigate();
diff --git a/src/views/wiki/create.tsx b/src/views/wiki/create.tsx
index 0804c1dcb..b2a2a42f6 100644
--- a/src/views/wiki/create.tsx
+++ b/src/views/wiki/create.tsx
@@ -12,7 +12,7 @@ import {
Textarea,
useToast,
} from "@chakra-ui/react";
-import { useNavigate, useSearchParams } from "react-router-dom";
+import { useNavigate, useSearchParams } from "react-router";
import { useForm } from "react-hook-form";
import { EventTemplate, nip19 } from "nostr-tools";
import dayjs from "dayjs";
diff --git a/src/views/wiki/edit.tsx b/src/views/wiki/edit.tsx
index 5ebdafe52..06c954747 100644
--- a/src/views/wiki/edit.tsx
+++ b/src/views/wiki/edit.tsx
@@ -10,7 +10,7 @@ import {
Textarea,
useToast,
} from "@chakra-ui/react";
-import { Navigate, useNavigate, useParams } from "react-router-dom";
+import { Navigate, useNavigate, useParams } from "react-router";
import { useForm } from "react-hook-form";
import { NostrEvent } from "nostr-tools";
diff --git a/src/views/wiki/index.tsx b/src/views/wiki/index.tsx
index c0bb11414..76a689003 100644
--- a/src/views/wiki/index.tsx
+++ b/src/views/wiki/index.tsx
@@ -1,5 +1,5 @@
import { AvatarGroup, Link, Button, Flex, Heading, LinkBox, SimpleGrid, useInterval } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { NostrEvent } from "nostr-tools";
import VerticalPageLayout from "../../components/vertical-page-layout";
diff --git a/src/views/wiki/page.tsx b/src/views/wiki/page.tsx
index dfb19d2d0..2bc687747 100644
--- a/src/views/wiki/page.tsx
+++ b/src/views/wiki/page.tsx
@@ -13,7 +13,7 @@ import {
Spinner,
Text,
} from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import useParamsAddressPointer from "../../hooks/use-params-address-pointer";
diff --git a/src/views/wiki/routes.tsx b/src/views/wiki/routes.tsx
new file mode 100644
index 000000000..e52efcaaa
--- /dev/null
+++ b/src/views/wiki/routes.tsx
@@ -0,0 +1,20 @@
+import { lazy } from "react";
+import { RouteObject } from "react-router";
+
+const WikiHomeView = lazy(() => import("."));
+const WikiSearchView = lazy(() => import("./search"));
+const WikiTopicView = lazy(() => import("./topic"));
+const WikiPageView = lazy(() => import("./page"));
+const EditWikiPageView = lazy(() => import("./edit"));
+const WikiCompareView = lazy(() => import("./compare"));
+const CreateWikiPageView = lazy(() => import("./create"));
+
+export default [
+ { index: true, element: },
+ { path: "search", element: },
+ { path: "topic/:topic", element: },
+ { path: "page/:naddr", element: },
+ { path: "edit/:topic", element: },
+ { path: "compare/:topic/:a/:b", element: },
+ { path: "create", element: },
+] satisfies RouteObject[];
diff --git a/src/views/wiki/search.tsx b/src/views/wiki/search.tsx
index 2467aabca..edda2f39f 100644
--- a/src/views/wiki/search.tsx
+++ b/src/views/wiki/search.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
-import { Navigate } from "react-router-dom";
+import { Navigate } from "react-router";
import { Button, Flex, Heading, Input, Link } from "@chakra-ui/react";
-import { Link as RouterLink } from "react-router-dom";
+import { Link as RouterLink } from "react-router";
import { Filter, NostrEvent } from "nostr-tools";
import { useForm } from "react-hook-form";
import { Subscription, getEventUID } from "nostr-idb";
diff --git a/src/views/wiki/topic.tsx b/src/views/wiki/topic.tsx
index f7cf5bd4a..dd949b7e1 100644
--- a/src/views/wiki/topic.tsx
+++ b/src/views/wiki/topic.tsx
@@ -1,5 +1,5 @@
import { Button, Flex, Heading, Link } from "@chakra-ui/react";
-import { Navigate, useParams, Link as RouterLink } from "react-router-dom";
+import { Navigate, useParams, Link as RouterLink } from "react-router";
import { useObservable } from "applesauce-react/hooks";
import { NostrEvent } from "nostr-tools";
diff --git a/tsconfig.json b/tsconfig.json
index 044df74f3..26454ebea 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -14,7 +14,10 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
- "jsx": "react-jsx"
+ "jsx": "react-jsx",
+ "paths": {
+ "~/*": ["./src/*"]
+ }
},
"include": ["src"],
"exclude": ["node_modules"]
diff --git a/vite.config.ts b/vite.config.ts
index 98d17a9cf..4660e2e2a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
-import fundingPlugin from "vite-plugin-funding";
+import tsconfigPaths from "vite-tsconfig-paths";
console.log("Build with:");
for (const [key, value] of Object.entries(process.env)) {
@@ -14,9 +14,16 @@ export default defineConfig({
build: {
target: ["chrome89", "edge89", "firefox89", "safari15"],
sourcemap: true,
+ rollupOptions: {
+ output: {
+ // don't create any chunks smaller than 500kB
+ experimentalMinChunkSize: 1024 * 100,
+ },
+ },
},
plugins: [
react(),
+ tsconfigPaths(),
VitePWA({
strategies: "injectManifest",
registerType: "autoUpdate",
@@ -27,11 +34,11 @@ export default defineConfig({
minify: false,
sourcemap: true,
// This increase the cache limit to 4mB
- maximumFileSizeToCacheInBytes: 2097152 * 2,
+ maximumFileSizeToCacheInBytes: 1024 * 1024 * 4,
},
workbox: {
// This increase the cache limit to 4mB
- maximumFileSizeToCacheInBytes: 2097152 * 2,
+ maximumFileSizeToCacheInBytes: 1024 * 1024 * 4,
},
manifest: {
name: "noStrudel",
@@ -85,6 +92,5 @@ export default defineConfig({
],
},
}),
- fundingPlugin({ types: ["lightning"] }),
],
});