From adbee3e17423e1505eccd92879f44b36d1473930 Mon Sep 17 00:00:00 2001 From: Shusui MOYATANI Date: Wed, 8 Mar 2023 13:33:55 +0900 Subject: [PATCH] refactor: move directory --- package-lock.json | 101 +++++++++++++++++- package.json | 1 + src/components/DeprecatedRepost.tsx | 6 +- src/components/SideBar.tsx | 6 +- src/components/TextNote.tsx | 12 +-- src/components/UserDisplayName.tsx | 4 +- src/components/notification/Reaction.tsx | 6 +- .../textNote/GeneralUserMentionDisplay.tsx | 4 +- src/components/textNote/ImageDisplay.tsx | 2 +- src/{clients => nostr}/useBatch.ts | 0 src/{clients => nostr}/useBatchedEvent.ts | 6 +- src/{clients => nostr}/useBatchedEvents.ts | 6 +- src/{clients => nostr}/useCachedEvents.ts | 2 +- src/{clients => nostr}/useCommands.ts | 2 +- src/{clients => nostr}/useConfig.ts | 0 .../useDeprecatedReposts.ts | 2 +- src/{clients => nostr}/useEvent.ts | 2 +- src/{clients => nostr}/useFollowings.ts | 2 +- src/{clients => nostr}/usePool.ts | 0 src/{clients => nostr}/useProfile.ts | 2 +- src/{clients => nostr}/usePubkey.ts | 0 src/{clients => nostr}/useReactions.ts | 2 +- src/{clients => nostr}/useSubscription.ts | 2 +- src/pages/Home.tsx | 10 +- 24 files changed, 137 insertions(+), 43 deletions(-) rename src/{clients => nostr}/useBatch.ts (100%) rename src/{clients => nostr}/useBatchedEvent.ts (90%) rename src/{clients => nostr}/useBatchedEvents.ts (94%) rename src/{clients => nostr}/useCachedEvents.ts (96%) rename src/{clients => nostr}/useCommands.ts (98%) rename src/{clients => nostr}/useConfig.ts (100%) rename src/{clients => nostr}/useDeprecatedReposts.ts (96%) rename src/{clients => nostr}/useEvent.ts (96%) rename src/{clients => nostr}/useFollowings.ts (96%) rename src/{clients => nostr}/usePool.ts (100%) rename src/{clients => nostr}/useProfile.ts (97%) rename src/{clients => nostr}/usePubkey.ts (100%) rename src/{clients => nostr}/useReactions.ts (96%) rename src/{clients => nostr}/useSubscription.ts (98%) diff --git a/package-lock.json b/package-lock.json index 2ece450..5bd83ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "license": "AGPL-3.0-or-later", "dependencies": { + "@atproto/api": "^0.1.3", "@solidjs/meta": "^0.28.2", "@solidjs/router": "^0.6.0", "@tailwindcss/forms": "^0.5.3", @@ -66,6 +67,39 @@ "node": ">=6.0.0" } }, + "node_modules/@atproto/api": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@atproto/api/-/api-0.1.3.tgz", + "integrity": "sha512-jEtE0Afxnkvth7/dZKYx9Gv1IpO2Jlmb8KzgRVPnyYyolI2GI4VTNs7mxxO/44cs8vKu2PN2zW+64XuaIY1JBA==", + "dependencies": { + "@atproto/xrpc": "*", + "typed-emitter": "^2.1.0" + } + }, + "node_modules/@atproto/lexicon": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@atproto/lexicon/-/lexicon-0.0.4.tgz", + "integrity": "sha512-00lqIKJetVlxQzNmEhrFzZeT9k+zGPBsHwtYpG7rH4vZ211i5WiDkmQcBwwFs2g/qCBt+nVq0dlgl3JhCLJXQg==", + "dependencies": { + "@atproto/nsid": "*", + "iso-datestring-validator": "^2.2.2", + "zod": "^3.14.2" + } + }, + "node_modules/@atproto/nsid": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@atproto/nsid/-/nsid-0.0.1.tgz", + "integrity": "sha512-t5M6/CzWBVYoBbIvfKDpqPj/+ZmyoK9ydZSStcTXosJ27XXwOPhz0VDUGKK2SM9G5Y7TPes8S5KTAU0UdVYFCw==" + }, + "node_modules/@atproto/xrpc": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@atproto/xrpc/-/xrpc-0.0.4.tgz", + "integrity": "sha512-Hxh+GgZx21Zvlb2RMlSlJDd3r3GR0vAS6OOZPW2xzWiVHsetb9ZlFB6D0AeAPj2R+U2UUkmdUR8G3U/nkgnQFA==", + "dependencies": { + "@atproto/lexicon": "*", + "zod": "^3.14.2" + } + }, "node_modules/@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -4818,6 +4852,11 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/iso-datestring-validator": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/iso-datestring-validator/-/iso-datestring-validator-2.2.2.tgz", + "integrity": "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA==" + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -7273,7 +7312,7 @@ "version": "7.8.0", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", - "dev": true, + "devOptional": true, "dependencies": { "tslib": "^2.1.0" } @@ -7282,7 +7321,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true + "devOptional": true }, "node_modules/safe-buffer": { "version": "5.1.2", @@ -8048,6 +8087,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", + "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "optionalDependencies": { + "rxjs": "*" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -8604,6 +8651,39 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@atproto/api": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@atproto/api/-/api-0.1.3.tgz", + "integrity": "sha512-jEtE0Afxnkvth7/dZKYx9Gv1IpO2Jlmb8KzgRVPnyYyolI2GI4VTNs7mxxO/44cs8vKu2PN2zW+64XuaIY1JBA==", + "requires": { + "@atproto/xrpc": "*", + "typed-emitter": "^2.1.0" + } + }, + "@atproto/lexicon": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@atproto/lexicon/-/lexicon-0.0.4.tgz", + "integrity": "sha512-00lqIKJetVlxQzNmEhrFzZeT9k+zGPBsHwtYpG7rH4vZ211i5WiDkmQcBwwFs2g/qCBt+nVq0dlgl3JhCLJXQg==", + "requires": { + "@atproto/nsid": "*", + "iso-datestring-validator": "^2.2.2", + "zod": "^3.14.2" + } + }, + "@atproto/nsid": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@atproto/nsid/-/nsid-0.0.1.tgz", + "integrity": "sha512-t5M6/CzWBVYoBbIvfKDpqPj/+ZmyoK9ydZSStcTXosJ27XXwOPhz0VDUGKK2SM9G5Y7TPes8S5KTAU0UdVYFCw==" + }, + "@atproto/xrpc": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@atproto/xrpc/-/xrpc-0.0.4.tgz", + "integrity": "sha512-Hxh+GgZx21Zvlb2RMlSlJDd3r3GR0vAS6OOZPW2xzWiVHsetb9ZlFB6D0AeAPj2R+U2UUkmdUR8G3U/nkgnQFA==", + "requires": { + "@atproto/lexicon": "*", + "zod": "^3.14.2" + } + }, "@babel/code-frame": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", @@ -11917,6 +11997,11 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "iso-datestring-validator": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/iso-datestring-validator/-/iso-datestring-validator-2.2.2.tgz", + "integrity": "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA==" + }, "istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -13731,7 +13816,7 @@ "version": "7.8.0", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", - "dev": true, + "devOptional": true, "requires": { "tslib": "^2.1.0" }, @@ -13740,7 +13825,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true + "devOptional": true } } }, @@ -14333,6 +14418,14 @@ "is-typed-array": "^1.1.9" } }, + "typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", + "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "requires": { + "rxjs": "*" + } + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", diff --git a/package.json b/package.json index b3782ce..c172bf3 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "vite-plugin-solid-svg": "^0.6.0" }, "dependencies": { + "@atproto/api": "^0.1.3", "@solidjs/meta": "^0.28.2", "@solidjs/router": "^0.6.0", "@tailwindcss/forms": "^0.5.3", diff --git a/src/components/DeprecatedRepost.tsx b/src/components/DeprecatedRepost.tsx index 827e6c9..6d8dc60 100644 --- a/src/components/DeprecatedRepost.tsx +++ b/src/components/DeprecatedRepost.tsx @@ -3,9 +3,9 @@ import { Show, Switch, Match, type Component } from 'solid-js'; import { Event as NostrEvent } from 'nostr-tools'; import ArrowPathRoundedSquare from 'heroicons/24/outline/arrow-path-rounded-square.svg'; -import useConfig from '@/clients/useConfig'; -import useEvent from '@/clients/useEvent'; -import useProfile from '@/clients/useProfile'; +import useConfig from '@/nostr/useConfig'; +import useEvent from '@/nostr/useEvent'; +import useProfile from '@/nostr/useProfile'; import UserDisplayName from '@/components/UserDisplayName'; import TextNote from '@/components/TextNote'; diff --git a/src/components/SideBar.tsx b/src/components/SideBar.tsx index b92e2be..fa46e90 100644 --- a/src/components/SideBar.tsx +++ b/src/components/SideBar.tsx @@ -4,9 +4,9 @@ import PencilSquare from 'heroicons/24/solid/pencil-square.svg'; import NotePostForm from '@/components/NotePostForm'; -import useConfig from '@/clients/useConfig'; -import useCommands from '@/clients/useCommands'; -import usePubkey from '@/clients/usePubkey'; +import useConfig from '@/nostr/useConfig'; +import useCommands from '@/nostr/useCommands'; +import usePubkey from '@/nostr/usePubkey'; import { useHandleCommand } from '@/hooks/useCommandBus'; import ensureNonNull from '@/utils/ensureNonNull'; diff --git a/src/components/TextNote.tsx b/src/components/TextNote.tsx index 5d62af3..a7c7d1f 100644 --- a/src/components/TextNote.tsx +++ b/src/components/TextNote.tsx @@ -8,12 +8,12 @@ import ArrowPathRoundedSquare from 'heroicons/24/outline/arrow-path-rounded-squa import ChatBubbleLeft from 'heroicons/24/outline/chat-bubble-left.svg'; import EllipsisHorizontal from 'heroicons/24/outline/ellipsis-horizontal.svg'; -import useProfile from '@/clients/useProfile'; -import useConfig from '@/clients/useConfig'; -import usePubkey from '@/clients/usePubkey'; -import useCommands from '@/clients/useCommands'; -import useReactions from '@/clients/useReactions'; -import useDeprecatedReposts from '@/clients/useDeprecatedReposts'; +import useProfile from '@/nostr/useProfile'; +import useConfig from '@/nostr/useConfig'; +import usePubkey from '@/nostr/usePubkey'; +import useCommands from '@/nostr/useCommands'; +import useReactions from '@/nostr/useReactions'; +import useDeprecatedReposts from '@/nostr/useDeprecatedReposts'; import useDatePulser from '@/hooks/useDatePulser'; import { formatRelative } from '@/utils/formatDate'; import ColumnItem from '@/components/ColumnItem'; diff --git a/src/components/UserDisplayName.tsx b/src/components/UserDisplayName.tsx index 2f5c73c..f6565f0 100644 --- a/src/components/UserDisplayName.tsx +++ b/src/components/UserDisplayName.tsx @@ -1,7 +1,7 @@ import { Component, Switch, Match } from 'solid-js'; -import useConfig from '@/clients/useConfig'; -import useProfile, { type Profile } from '@/clients/useProfile'; +import useConfig from '@/nostr/useConfig'; +import useProfile, { type Profile } from '@/nostr/useProfile'; type UserNameDisplayProps = { pubkey: string; diff --git a/src/components/notification/Reaction.tsx b/src/components/notification/Reaction.tsx index 83b6a86..30f39ae 100644 --- a/src/components/notification/Reaction.tsx +++ b/src/components/notification/Reaction.tsx @@ -5,9 +5,9 @@ import HeartSolid from 'heroicons/24/solid/heart.svg'; import UserDisplayName from '@/components/UserDisplayName'; import TextNote from '@/components/TextNote'; -import useConfig from '@/clients/useConfig'; -import useProfile from '@/clients/useProfile'; -import useEvent from '@/clients/useEvent'; +import useConfig from '@/nostr/useConfig'; +import useProfile from '@/nostr/useProfile'; +import useEvent from '@/nostr/useEvent'; type ReactionProps = { event: NostrEvent; diff --git a/src/components/textNote/GeneralUserMentionDisplay.tsx b/src/components/textNote/GeneralUserMentionDisplay.tsx index d23e429..3cab221 100644 --- a/src/components/textNote/GeneralUserMentionDisplay.tsx +++ b/src/components/textNote/GeneralUserMentionDisplay.tsx @@ -1,6 +1,6 @@ import type { MentionedUser } from '@/core/parseTextNote'; -import useProfile from '@/clients/useProfile'; -import useConfig from '@/clients/useConfig'; +import useProfile from '@/nostr/useProfile'; +import useConfig from '@/nostr/useConfig'; import { Show } from 'solid-js'; export type GeneralUserMentionDisplayProps = { diff --git a/src/components/textNote/ImageDisplay.tsx b/src/components/textNote/ImageDisplay.tsx index ec08432..ed3207b 100644 --- a/src/components/textNote/ImageDisplay.tsx +++ b/src/components/textNote/ImageDisplay.tsx @@ -23,7 +23,7 @@ const ImageDisplay: Component = (props) => { const url = () => new URL(props.url); return ( - + = { interval?: number; diff --git a/src/clients/useBatchedEvents.ts b/src/nostr/useBatchedEvents.ts similarity index 94% rename from src/clients/useBatchedEvents.ts rename to src/nostr/useBatchedEvents.ts index 6cee065..d02c7c0 100644 --- a/src/clients/useBatchedEvents.ts +++ b/src/nostr/useBatchedEvents.ts @@ -1,9 +1,9 @@ import { createSignal, createMemo, type Signal, type Accessor } from 'solid-js'; import { type Event as NostrEvent, type Filter } from 'nostr-tools'; -import useConfig from '@/clients/useConfig'; -import useBatch, { type Task } from '@/clients/useBatch'; -import useSubscription from '@/clients/useSubscription'; +import useConfig from '@/nostr/useConfig'; +import useBatch, { type Task } from '@/nostr/useBatch'; +import useSubscription from '@/nostr/useSubscription'; export type UseBatchedEventsProps = { interval?: number; diff --git a/src/clients/useCachedEvents.ts b/src/nostr/useCachedEvents.ts similarity index 96% rename from src/clients/useCachedEvents.ts rename to src/nostr/useCachedEvents.ts index 0d13266..260df12 100644 --- a/src/clients/useCachedEvents.ts +++ b/src/nostr/useCachedEvents.ts @@ -1,5 +1,5 @@ import { createQuery } from '@tanstack/solid-query'; -import { type UseSubscriptionProps } from '@/clients/useSubscription'; +import { type UseSubscriptionProps } from '@/nostr/useSubscription'; import type { Event as NostrEvent, Filter, SimplePool, SubscriptionOptions } from 'nostr-tools'; import usePool from './usePool'; diff --git a/src/clients/useCommands.ts b/src/nostr/useCommands.ts similarity index 98% rename from src/clients/useCommands.ts rename to src/nostr/useCommands.ts index 25d200e..1e25022 100644 --- a/src/clients/useCommands.ts +++ b/src/nostr/useCommands.ts @@ -1,7 +1,7 @@ import { getEventHash, type Event as NostrEvent, type Pub } from 'nostr-tools'; import '@/types/nostr.d'; -import usePool from '@/clients/usePool'; +import usePool from '@/nostr/usePool'; const currentDate = (): number => Math.floor(Date.now() / 1000); diff --git a/src/clients/useConfig.ts b/src/nostr/useConfig.ts similarity index 100% rename from src/clients/useConfig.ts rename to src/nostr/useConfig.ts diff --git a/src/clients/useDeprecatedReposts.ts b/src/nostr/useDeprecatedReposts.ts similarity index 96% rename from src/clients/useDeprecatedReposts.ts rename to src/nostr/useDeprecatedReposts.ts index e879e98..2baf10e 100644 --- a/src/clients/useDeprecatedReposts.ts +++ b/src/nostr/useDeprecatedReposts.ts @@ -2,7 +2,7 @@ import { createMemo, type Accessor } from 'solid-js'; import { type Event as NostrEvent } from 'nostr-tools'; import { createQuery, useQueryClient, type CreateQueryResult } from '@tanstack/solid-query'; -import useBatchedEvents, { type BatchedEvents } from '@/clients/useBatchedEvents'; +import useBatchedEvents, { type BatchedEvents } from '@/nostr/useBatchedEvents'; import timeout from '@/utils/timeout'; export type UseDeprecatedRepostsProps = { diff --git a/src/clients/useEvent.ts b/src/nostr/useEvent.ts similarity index 96% rename from src/clients/useEvent.ts rename to src/nostr/useEvent.ts index f28eeba..07787cb 100644 --- a/src/clients/useEvent.ts +++ b/src/nostr/useEvent.ts @@ -3,7 +3,7 @@ import { type Event as NostrEvent } from 'nostr-tools'; import { createQuery, type CreateQueryResult } from '@tanstack/solid-query'; import timeout from '@/utils/timeout'; -import useBatchedEvent from '@/clients/useBatchedEvent'; +import useBatchedEvent from '@/nostr/useBatchedEvent'; export type UseEventProps = { // TODO リレーURLを考慮したい diff --git a/src/clients/useFollowings.ts b/src/nostr/useFollowings.ts similarity index 96% rename from src/clients/useFollowings.ts rename to src/nostr/useFollowings.ts index 6735de9..4a1da6d 100644 --- a/src/clients/useFollowings.ts +++ b/src/nostr/useFollowings.ts @@ -1,5 +1,5 @@ import { createMemo } from 'solid-js'; -import useCachedEvents from '@/clients/useCachedEvents'; +import useCachedEvents from '@/nostr/useCachedEvents'; type UseFollowingsProps = { relayUrls: string[]; diff --git a/src/clients/usePool.ts b/src/nostr/usePool.ts similarity index 100% rename from src/clients/usePool.ts rename to src/nostr/usePool.ts diff --git a/src/clients/useProfile.ts b/src/nostr/useProfile.ts similarity index 97% rename from src/clients/useProfile.ts rename to src/nostr/useProfile.ts index af8bdfc..744dceb 100644 --- a/src/clients/useProfile.ts +++ b/src/nostr/useProfile.ts @@ -2,7 +2,7 @@ import { createMemo, type Accessor } from 'solid-js'; import { type Event as NostrEvent, type Filter } from 'nostr-tools'; import { createQuery, type CreateQueryResult } from '@tanstack/solid-query'; -import useBatchedEvent from '@/clients/useBatchedEvent'; +import useBatchedEvent from '@/nostr/useBatchedEvent'; import timeout from '@/utils/timeout'; // TODO zodにする diff --git a/src/clients/usePubkey.ts b/src/nostr/usePubkey.ts similarity index 100% rename from src/clients/usePubkey.ts rename to src/nostr/usePubkey.ts diff --git a/src/clients/useReactions.ts b/src/nostr/useReactions.ts similarity index 96% rename from src/clients/useReactions.ts rename to src/nostr/useReactions.ts index a601370..9e8573e 100644 --- a/src/clients/useReactions.ts +++ b/src/nostr/useReactions.ts @@ -2,7 +2,7 @@ import { createMemo, type Accessor } from 'solid-js'; import { type Event as NostrEvent } from 'nostr-tools'; import { createQuery, useQueryClient, type CreateQueryResult } from '@tanstack/solid-query'; -import useBatchedEvents, { type BatchedEvents } from '@/clients/useBatchedEvents'; +import useBatchedEvents, { type BatchedEvents } from '@/nostr/useBatchedEvents'; import timeout from '@/utils/timeout'; export type UseReactionsProps = { diff --git a/src/clients/useSubscription.ts b/src/nostr/useSubscription.ts similarity index 98% rename from src/clients/useSubscription.ts rename to src/nostr/useSubscription.ts index 859e64d..66300ec 100644 --- a/src/clients/useSubscription.ts +++ b/src/nostr/useSubscription.ts @@ -1,6 +1,6 @@ import { createSignal, createEffect, onCleanup } from 'solid-js'; import type { Event as NostrEvent, Filter, SubscriptionOptions } from 'nostr-tools'; -import usePool from '@/clients/usePool'; +import usePool from '@/nostr/usePool'; export type UseSubscriptionProps = { relayUrls: string[]; diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 8d71b03..9637ebf 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -6,11 +6,11 @@ import SideBar from '@/components/SideBar'; import Timeline from '@/components/Timeline'; import Notification from '@/components/Notification'; -import usePool from '@/clients/usePool'; -import useConfig from '@/clients/useConfig'; -import useSubscription from '@/clients/useSubscription'; -import useFollowings from '@/clients/useFollowings'; -import usePubkey from '@/clients/usePubkey'; +import usePool from '@/nostr/usePool'; +import useConfig from '@/nostr/useConfig'; +import useSubscription from '@/nostr/useSubscription'; +import useFollowings from '@/nostr/useFollowings'; +import usePubkey from '@/nostr/usePubkey'; import { useMountShortcutKeys } from '@/hooks/useShortcutKeys'; import useLoginStatus from '@/hooks/useLoginStatus';