diff --git a/packages/pl-fe/src/api/hooks/accounts/useAccountList.ts b/packages/pl-fe/src/api/hooks/accounts/use-account-list.ts similarity index 95% rename from packages/pl-fe/src/api/hooks/accounts/useAccountList.ts rename to packages/pl-fe/src/api/hooks/accounts/use-account-list.ts index 8f7931a89b..a0ea24fe13 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useAccountList.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-account-list.ts @@ -1,11 +1,11 @@ import { useInfiniteQuery } from '@tanstack/react-query'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { type Account, normalizeAccount } from 'pl-fe/normalizers/account'; import { flattenPages } from 'pl-fe/utils/queries'; -import { useRelationships } from './useRelationships'; +import { useRelationships } from './use-relationships'; import type { PaginatedResponse, Account as BaseAccount } from 'pl-api'; import type { EntityFn } from 'pl-fe/entity-store/hooks/types'; diff --git a/packages/pl-fe/src/api/hooks/accounts/useAccountLookup.ts b/packages/pl-fe/src/api/hooks/accounts/use-account-lookup.ts similarity index 82% rename from packages/pl-fe/src/api/hooks/accounts/useAccountLookup.ts rename to packages/pl-fe/src/api/hooks/accounts/use-account-lookup.ts index d0a0502623..ac3806700e 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useAccountLookup.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-account-lookup.ts @@ -2,14 +2,14 @@ import { useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntityLookup } from 'pl-fe/entity-store/hooks/useEntityLookup'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useEntityLookup } from 'pl-fe/entity-store/hooks/use-entity-lookup'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { type Account, normalizeAccount } from 'pl-fe/normalizers/account'; -import { useAccountScrobble } from './useAccountScrobble'; -import { useRelationship } from './useRelationship'; +import { useAccountScrobble } from './use-account-scrobble'; +import { useRelationship } from './use-relationship'; import type { Account as BaseAccount } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/accounts/useAccountScrobble.ts b/packages/pl-fe/src/api/hooks/accounts/use-account-scrobble.ts similarity index 87% rename from packages/pl-fe/src/api/hooks/accounts/useAccountScrobble.ts rename to packages/pl-fe/src/api/hooks/accounts/use-account-scrobble.ts index 86269a3ede..deacc89643 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useAccountScrobble.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-account-scrobble.ts @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { Scrobble } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/accounts/useAccount.ts b/packages/pl-fe/src/api/hooks/accounts/use-account.ts similarity index 81% rename from packages/pl-fe/src/api/hooks/accounts/useAccount.ts rename to packages/pl-fe/src/api/hooks/accounts/use-account.ts index 785f309828..2f27e7ef7f 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useAccount.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-account.ts @@ -2,15 +2,15 @@ import { useEffect, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntity } from 'pl-fe/entity-store/hooks/useEntity'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useEntity } from 'pl-fe/entity-store/hooks/use-entity'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { type Account, normalizeAccount } from 'pl-fe/normalizers/account'; -import { useAccountScrobble } from './useAccountScrobble'; -import { useRelationship } from './useRelationship'; +import { useAccountScrobble } from './use-account-scrobble'; +import { useRelationship } from './use-relationship'; import type { Account as BaseAccount } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/accounts/useFollow.ts b/packages/pl-fe/src/api/hooks/accounts/use-follow.ts similarity index 88% rename from packages/pl-fe/src/api/hooks/accounts/useFollow.ts rename to packages/pl-fe/src/api/hooks/accounts/use-follow.ts index 9314877341..790b522a5b 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useFollow.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-follow.ts @@ -1,9 +1,9 @@ import { importEntities } from 'pl-fe/entity-store/actions'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useTransaction } from 'pl-fe/entity-store/hooks/useTransaction'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useTransaction } from 'pl-fe/entity-store/hooks/use-transaction'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; interface FollowOpts { reblogs?: boolean; diff --git a/packages/pl-fe/src/api/hooks/accounts/useRelationship.ts b/packages/pl-fe/src/api/hooks/accounts/use-relationship.ts similarity index 81% rename from packages/pl-fe/src/api/hooks/accounts/useRelationship.ts rename to packages/pl-fe/src/api/hooks/accounts/use-relationship.ts index e2bce48152..003a127b7a 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useRelationship.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-relationship.ts @@ -1,9 +1,9 @@ import * as v from 'valibot'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntity } from 'pl-fe/entity-store/hooks/useEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useEntity } from 'pl-fe/entity-store/hooks/use-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import type { Relationship } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/accounts/useRelationships.ts b/packages/pl-fe/src/api/hooks/accounts/use-relationships.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/accounts/useRelationships.ts rename to packages/pl-fe/src/api/hooks/accounts/use-relationships.ts index c0b44e5cbb..89d59a47f6 100644 --- a/packages/pl-fe/src/api/hooks/accounts/useRelationships.ts +++ b/packages/pl-fe/src/api/hooks/accounts/use-relationships.ts @@ -1,7 +1,7 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useBatchedEntities } from 'pl-fe/entity-store/hooks/useBatchedEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useBatchedEntities } from 'pl-fe/entity-store/hooks/use-batched-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import type { Relationship } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/admin/useAnnouncements.ts b/packages/pl-fe/src/api/hooks/admin/use-announcements.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/admin/useAnnouncements.ts rename to packages/pl-fe/src/api/hooks/admin/use-announcements.ts index 6c2c78ff15..c313e0895c 100644 --- a/packages/pl-fe/src/api/hooks/admin/useAnnouncements.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-announcements.ts @@ -7,10 +7,10 @@ import { } from 'pl-api'; import * as v from 'valibot'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { queryClient } from 'pl-fe/queries/client'; -import { useAnnouncements as useUserAnnouncements } from '../announcements/useAnnouncements'; +import { useAnnouncements as useUserAnnouncements } from '../announcements/use-announcements'; const useAnnouncements = () => { const client = useClient(); diff --git a/packages/pl-fe/src/api/hooks/admin/useDomains.ts b/packages/pl-fe/src/api/hooks/admin/use-domains.ts similarity index 97% rename from packages/pl-fe/src/api/hooks/admin/useDomains.ts rename to packages/pl-fe/src/api/hooks/admin/use-domains.ts index 4f11adb8ba..b375db8777 100644 --- a/packages/pl-fe/src/api/hooks/admin/useDomains.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-domains.ts @@ -1,6 +1,6 @@ import { useMutation, useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { queryClient } from 'pl-fe/queries/client'; import type { AdminDomain } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/admin/useModerationLog.ts b/packages/pl-fe/src/api/hooks/admin/use-moderation-log.ts similarity index 94% rename from packages/pl-fe/src/api/hooks/admin/useModerationLog.ts rename to packages/pl-fe/src/api/hooks/admin/use-moderation-log.ts index 9ef56c6844..48e2bb05e7 100644 --- a/packages/pl-fe/src/api/hooks/admin/useModerationLog.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-moderation-log.ts @@ -1,7 +1,7 @@ import { useInfiniteQuery } from '@tanstack/react-query'; import { PaginatedResponse } from 'pl-api'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { flattenPages } from 'pl-fe/utils/queries'; import type { AdminModerationLogEntry } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/admin/useRelays.ts b/packages/pl-fe/src/api/hooks/admin/use-relays.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/admin/useRelays.ts rename to packages/pl-fe/src/api/hooks/admin/use-relays.ts index 4ad7d97826..551b58f80d 100644 --- a/packages/pl-fe/src/api/hooks/admin/useRelays.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-relays.ts @@ -1,6 +1,6 @@ import { useMutation, useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { queryClient } from 'pl-fe/queries/client'; import type { AdminRelay } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/admin/useRules.ts b/packages/pl-fe/src/api/hooks/admin/use-rules.ts similarity index 97% rename from packages/pl-fe/src/api/hooks/admin/useRules.ts rename to packages/pl-fe/src/api/hooks/admin/use-rules.ts index 2906cbda57..26be9e15e3 100644 --- a/packages/pl-fe/src/api/hooks/admin/useRules.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-rules.ts @@ -1,6 +1,6 @@ import { useMutation, useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { queryClient } from 'pl-fe/queries/client'; import type { AdminRule } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/admin/useSuggest.ts b/packages/pl-fe/src/api/hooks/admin/use-suggest.ts similarity index 90% rename from packages/pl-fe/src/api/hooks/admin/useSuggest.ts rename to packages/pl-fe/src/api/hooks/admin/use-suggest.ts index f392e91514..643e34d37b 100644 --- a/packages/pl-fe/src/api/hooks/admin/useSuggest.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-suggest.ts @@ -1,6 +1,6 @@ import { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; -import { useTransaction } from 'pl-fe/entity-store/hooks/useTransaction'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useTransaction } from 'pl-fe/entity-store/hooks/use-transaction'; +import { useClient } from 'pl-fe/hooks/use-client'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/api/hooks/admin/useVerify.ts b/packages/pl-fe/src/api/hooks/admin/use-verify.ts similarity index 92% rename from packages/pl-fe/src/api/hooks/admin/useVerify.ts rename to packages/pl-fe/src/api/hooks/admin/use-verify.ts index c3b4e956a4..f0e04db046 100644 --- a/packages/pl-fe/src/api/hooks/admin/useVerify.ts +++ b/packages/pl-fe/src/api/hooks/admin/use-verify.ts @@ -1,5 +1,5 @@ -import { useTransaction } from 'pl-fe/entity-store/hooks/useTransaction'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useTransaction } from 'pl-fe/entity-store/hooks/use-transaction'; +import { useClient } from 'pl-fe/hooks/use-client'; import type { EntityCallbacks } from 'pl-fe/entity-store/hooks/types'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/api/hooks/announcements/useAnnouncements.ts b/packages/pl-fe/src/api/hooks/announcements/use-announcements.ts similarity index 98% rename from packages/pl-fe/src/api/hooks/announcements/useAnnouncements.ts rename to packages/pl-fe/src/api/hooks/announcements/use-announcements.ts index 04443affdd..a5e64dbd84 100644 --- a/packages/pl-fe/src/api/hooks/announcements/useAnnouncements.ts +++ b/packages/pl-fe/src/api/hooks/announcements/use-announcements.ts @@ -2,7 +2,7 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import { announcementReactionSchema, type AnnouncementReaction, type Announcement } from 'pl-api'; import * as v from 'valibot'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { queryClient } from 'pl-fe/queries/client'; const updateReaction = (reaction: AnnouncementReaction, count: number, me?: boolean, overwrite?: boolean) => v.parse(announcementReactionSchema, { diff --git a/packages/pl-fe/src/api/hooks/groups/useBlockGroupMember.ts b/packages/pl-fe/src/api/hooks/groups/use-block-group-member.ts similarity index 80% rename from packages/pl-fe/src/api/hooks/groups/useBlockGroupMember.ts rename to packages/pl-fe/src/api/hooks/groups/use-block-group-member.ts index 7821a83dac..673b261dd6 100644 --- a/packages/pl-fe/src/api/hooks/groups/useBlockGroupMember.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-block-group-member.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import type { Group } from 'pl-api'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/api/hooks/groups/useCreateGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-create-group.ts similarity index 82% rename from packages/pl-fe/src/api/hooks/groups/useCreateGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-create-group.ts index 34422ebb57..5cf5b6b5f8 100644 --- a/packages/pl-fe/src/api/hooks/groups/useCreateGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-create-group.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroup, type Group } from 'pl-fe/normalizers/group'; import type { Group as BaseGroup, CreateGroupParams } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useDeleteGroupStatus.ts b/packages/pl-fe/src/api/hooks/groups/use-delete-group-status.ts similarity index 78% rename from packages/pl-fe/src/api/hooks/groups/useDeleteGroupStatus.ts rename to packages/pl-fe/src/api/hooks/groups/use-delete-group-status.ts index 2481a6977d..f2a08bd133 100644 --- a/packages/pl-fe/src/api/hooks/groups/useDeleteGroupStatus.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-delete-group-status.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useDeleteEntity } from 'pl-fe/entity-store/hooks/useDeleteEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useDeleteEntity } from 'pl-fe/entity-store/hooks/use-delete-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import type { Group } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useDeleteGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-delete-group.ts similarity index 73% rename from packages/pl-fe/src/api/hooks/groups/useDeleteGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-delete-group.ts index 560746c2d3..3be1ce3298 100644 --- a/packages/pl-fe/src/api/hooks/groups/useDeleteGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-delete-group.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useDeleteEntity } from 'pl-fe/entity-store/hooks/useDeleteEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useDeleteEntity } from 'pl-fe/entity-store/hooks/use-delete-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; const useDeleteGroup = () => { const client = useClient(); diff --git a/packages/pl-fe/src/api/hooks/groups/useDemoteGroupMember.ts b/packages/pl-fe/src/api/hooks/groups/use-demote-group-member.ts similarity index 85% rename from packages/pl-fe/src/api/hooks/groups/useDemoteGroupMember.ts rename to packages/pl-fe/src/api/hooks/groups/use-demote-group-member.ts index 5f8ee3e082..7a1a6c64c8 100644 --- a/packages/pl-fe/src/api/hooks/groups/useDemoteGroupMember.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-demote-group-member.ts @@ -1,8 +1,8 @@ import * as v from 'valibot'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroupMember } from 'pl-fe/normalizers/group-member'; import type { Group, GroupMember as GroupMember, GroupRole } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupMedia.test.ts b/packages/pl-fe/src/api/hooks/groups/use-group-media.test.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/groups/useGroupMedia.test.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-media.test.ts index e8b0454450..3e27a9be57 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupMedia.test.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-media.test.ts @@ -2,7 +2,7 @@ import { __stub } from 'pl-fe/api'; import { buildStatus } from 'pl-fe/jest/factory'; import { renderHook, waitFor } from 'pl-fe/jest/test-helpers'; -import { useGroupMedia } from './useGroupMedia'; +import { useGroupMedia } from './use-group-media'; const status = buildStatus(); const groupId = '1'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupMedia.ts b/packages/pl-fe/src/api/hooks/groups/use-group-media.ts similarity index 77% rename from packages/pl-fe/src/api/hooks/groups/useGroupMedia.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-media.ts index 9f2b099c40..d2b4134832 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupMedia.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-media.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeStatus } from 'pl-fe/normalizers/status'; const useGroupMedia = (groupId: string) => { diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupMembers.test.ts b/packages/pl-fe/src/api/hooks/groups/use-group-members.test.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/groups/useGroupMembers.test.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-members.test.ts index 317862a81b..d6dbf53dc0 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupMembers.test.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-members.test.ts @@ -4,7 +4,7 @@ import { __stub } from 'pl-fe/api'; import { buildGroupMember } from 'pl-fe/jest/factory'; import { renderHook, waitFor } from 'pl-fe/jest/test-helpers'; -import { useGroupMembers } from './useGroupMembers'; +import { useGroupMembers } from './use-group-members'; const groupMember = buildGroupMember(); const groupId = '1'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupMembers.ts b/packages/pl-fe/src/api/hooks/groups/use-group-members.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/groups/useGroupMembers.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-members.ts index 9a2978831c..d8e8df888e 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupMembers.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-members.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroupMember, type GroupMember } from 'pl-fe/normalizers/group-member'; import type { GroupMember as BaseGroupMember, GroupRoles } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupMembershipRequests.ts b/packages/pl-fe/src/api/hooks/groups/use-group-membership-requests.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/groups/useGroupMembershipRequests.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-membership-requests.ts index ead857e73b..2951f1cdb8 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupMembershipRequests.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-membership-requests.ts @@ -1,12 +1,12 @@ import { GroupRoles } from 'pl-api'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useDismissEntity } from 'pl-fe/entity-store/hooks/useDismissEntity'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useDismissEntity } from 'pl-fe/entity-store/hooks/use-dismiss-entity'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeAccount } from 'pl-fe/normalizers/account'; -import { useGroupRelationship } from './useGroupRelationship'; +import { useGroupRelationship } from './use-group-relationship'; import type { ExpandedEntitiesPath } from 'pl-fe/entity-store/hooks/types'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupRelationship.ts b/packages/pl-fe/src/api/hooks/groups/use-group-relationship.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/groups/useGroupRelationship.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-relationship.ts index 196fe73f49..dfa7f4e697 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupRelationship.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-relationship.ts @@ -1,8 +1,8 @@ import * as v from 'valibot'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntity } from 'pl-fe/entity-store/hooks/useEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useEntity } from 'pl-fe/entity-store/hooks/use-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import type { GroupRelationship } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroupRelationships.ts b/packages/pl-fe/src/api/hooks/groups/use-group-relationships.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/groups/useGroupRelationships.ts rename to packages/pl-fe/src/api/hooks/groups/use-group-relationships.ts index 6aff570560..f6cc6e9467 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroupRelationships.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group-relationships.ts @@ -1,7 +1,7 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useBatchedEntities } from 'pl-fe/entity-store/hooks/useBatchedEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useBatchedEntities } from 'pl-fe/entity-store/hooks/use-batched-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import type { GroupRelationship } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroup.test.ts b/packages/pl-fe/src/api/hooks/groups/use-group.test.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/groups/useGroup.test.ts rename to packages/pl-fe/src/api/hooks/groups/use-group.test.ts index 0f46a7f0ab..5bf5d0548a 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroup.test.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group.test.ts @@ -2,7 +2,7 @@ import { __stub } from 'pl-fe/api'; import { buildGroup } from 'pl-fe/jest/factory'; import { renderHook, waitFor } from 'pl-fe/jest/test-helpers'; -import { useGroup } from './useGroup'; +import { useGroup } from './use-group'; const group = buildGroup({ id: '1', display_name: 'soapbox' }); diff --git a/packages/pl-fe/src/api/hooks/groups/useGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-group.ts similarity index 84% rename from packages/pl-fe/src/api/hooks/groups/useGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-group.ts index 2389d2e7b8..ef1e2203ba 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-group.ts @@ -2,11 +2,11 @@ import { useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntity } from 'pl-fe/entity-store/hooks/useEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useEntity } from 'pl-fe/entity-store/hooks/use-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroup, type Group } from 'pl-fe/normalizers/group'; -import { useGroupRelationship } from './useGroupRelationship'; +import { useGroupRelationship } from './use-group-relationship'; import type { Group as BaseGroup } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useGroups.test.ts b/packages/pl-fe/src/api/hooks/groups/use-groups.test.ts similarity index 96% rename from packages/pl-fe/src/api/hooks/groups/useGroups.test.ts rename to packages/pl-fe/src/api/hooks/groups/use-groups.test.ts index 856a1289b0..b7559a5c85 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroups.test.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-groups.test.ts @@ -5,7 +5,7 @@ import { __stub } from 'pl-fe/api'; import { buildGroup } from 'pl-fe/jest/factory'; import { renderHook, waitFor } from 'pl-fe/jest/test-helpers'; -import { useGroups } from './useGroups'; +import { useGroups } from './use-groups'; const group = buildGroup({ id: '1', display_name: 'soapbox' }); const store = { diff --git a/packages/pl-fe/src/api/hooks/groups/useGroups.ts b/packages/pl-fe/src/api/hooks/groups/use-groups.ts similarity index 76% rename from packages/pl-fe/src/api/hooks/groups/useGroups.ts rename to packages/pl-fe/src/api/hooks/groups/use-groups.ts index be212bdfee..43aff160bb 100644 --- a/packages/pl-fe/src/api/hooks/groups/useGroups.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-groups.ts @@ -1,10 +1,10 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { normalizeGroup, type Group } from 'pl-fe/normalizers/group'; -import { useGroupRelationships } from './useGroupRelationships'; +import { useGroupRelationships } from './use-group-relationships'; import type { Group as BaseGroup } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useJoinGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-join-group.ts similarity index 74% rename from packages/pl-fe/src/api/hooks/groups/useJoinGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-join-group.ts index abe50d8ad8..b30912c338 100644 --- a/packages/pl-fe/src/api/hooks/groups/useJoinGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-join-group.ts @@ -1,8 +1,8 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; -import { useGroups } from './useGroups'; +import { useGroups } from './use-groups'; import type { Group } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useLeaveGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-leave-group.ts similarity index 74% rename from packages/pl-fe/src/api/hooks/groups/useLeaveGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-leave-group.ts index ac8aba3804..d102e0e844 100644 --- a/packages/pl-fe/src/api/hooks/groups/useLeaveGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-leave-group.ts @@ -1,8 +1,8 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; -import { useGroups } from './useGroups'; +import { useGroups } from './use-groups'; import type { Group } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/usePromoteGroupMember.ts b/packages/pl-fe/src/api/hooks/groups/use-promote-group-member.ts similarity index 85% rename from packages/pl-fe/src/api/hooks/groups/usePromoteGroupMember.ts rename to packages/pl-fe/src/api/hooks/groups/use-promote-group-member.ts index d961d7caa2..84a132593e 100644 --- a/packages/pl-fe/src/api/hooks/groups/usePromoteGroupMember.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-promote-group-member.ts @@ -1,8 +1,8 @@ import * as v from 'valibot'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroupMember } from 'pl-fe/normalizers/group-member'; import type { Group, GroupMember, GroupRole } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/groups/useUpdateGroup.ts b/packages/pl-fe/src/api/hooks/groups/use-update-group.ts similarity index 83% rename from packages/pl-fe/src/api/hooks/groups/useUpdateGroup.ts rename to packages/pl-fe/src/api/hooks/groups/use-update-group.ts index efe91ed342..b838f9c831 100644 --- a/packages/pl-fe/src/api/hooks/groups/useUpdateGroup.ts +++ b/packages/pl-fe/src/api/hooks/groups/use-update-group.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; import { normalizeGroup } from 'pl-fe/normalizers/group'; interface UpdateGroupParams { diff --git a/packages/pl-fe/src/api/hooks/instance/useTranslationLanguages.ts b/packages/pl-fe/src/api/hooks/instance/use-translation-languages.ts similarity index 81% rename from packages/pl-fe/src/api/hooks/instance/useTranslationLanguages.ts rename to packages/pl-fe/src/api/hooks/instance/use-translation-languages.ts index 471c205957..0fcdc3fab6 100644 --- a/packages/pl-fe/src/api/hooks/instance/useTranslationLanguages.ts +++ b/packages/pl-fe/src/api/hooks/instance/use-translation-languages.ts @@ -1,9 +1,9 @@ import { useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; const useTranslationLanguages = () => { const client = useClient(); diff --git a/packages/pl-fe/src/api/hooks/settings/useInteractionPolicies.ts b/packages/pl-fe/src/api/hooks/settings/use-interaction-policies.ts similarity index 87% rename from packages/pl-fe/src/api/hooks/settings/useInteractionPolicies.ts rename to packages/pl-fe/src/api/hooks/settings/use-interaction-policies.ts index e017922539..645df7fa02 100644 --- a/packages/pl-fe/src/api/hooks/settings/useInteractionPolicies.ts +++ b/packages/pl-fe/src/api/hooks/settings/use-interaction-policies.ts @@ -2,9 +2,9 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import { type InteractionPolicies, interactionPoliciesSchema } from 'pl-api'; import * as v from 'valibot'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { queryClient } from 'pl-fe/queries/client'; const emptySchema = v.parse(interactionPoliciesSchema, {}); diff --git a/packages/pl-fe/src/api/hooks/statuses/useBookmarkFolder.ts b/packages/pl-fe/src/api/hooks/statuses/use-bookmark-folder.ts similarity index 83% rename from packages/pl-fe/src/api/hooks/statuses/useBookmarkFolder.ts rename to packages/pl-fe/src/api/hooks/statuses/use-bookmark-folder.ts index 33b0122fdd..3975175539 100644 --- a/packages/pl-fe/src/api/hooks/statuses/useBookmarkFolder.ts +++ b/packages/pl-fe/src/api/hooks/statuses/use-bookmark-folder.ts @@ -1,8 +1,8 @@ import { Entities } from 'pl-fe/entity-store/entities'; import { selectEntity } from 'pl-fe/entity-store/selectors'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; -import { useBookmarkFolders } from './useBookmarkFolders'; +import { useBookmarkFolders } from './use-bookmark-folders'; import type{ BookmarkFolder } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/statuses/useBookmarkFolders.ts b/packages/pl-fe/src/api/hooks/statuses/use-bookmark-folders.ts similarity index 74% rename from packages/pl-fe/src/api/hooks/statuses/useBookmarkFolders.ts rename to packages/pl-fe/src/api/hooks/statuses/use-bookmark-folders.ts index 11bdf3495d..f936e4f199 100644 --- a/packages/pl-fe/src/api/hooks/statuses/useBookmarkFolders.ts +++ b/packages/pl-fe/src/api/hooks/statuses/use-bookmark-folders.ts @@ -1,7 +1,7 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { BookmarkFolder } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/statuses/useCreateBookmarkFolder.ts b/packages/pl-fe/src/api/hooks/statuses/use-create-bookmark-folder.ts similarity index 79% rename from packages/pl-fe/src/api/hooks/statuses/useCreateBookmarkFolder.ts rename to packages/pl-fe/src/api/hooks/statuses/use-create-bookmark-folder.ts index 0944609f19..8f351906bb 100644 --- a/packages/pl-fe/src/api/hooks/statuses/useCreateBookmarkFolder.ts +++ b/packages/pl-fe/src/api/hooks/statuses/use-create-bookmark-folder.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; interface CreateBookmarkFolderParams { name: string; diff --git a/packages/pl-fe/src/api/hooks/statuses/useDeleteBookmarkFolder.ts b/packages/pl-fe/src/api/hooks/statuses/use-delete-bookmark-folder.ts similarity index 76% rename from packages/pl-fe/src/api/hooks/statuses/useDeleteBookmarkFolder.ts rename to packages/pl-fe/src/api/hooks/statuses/use-delete-bookmark-folder.ts index 4df699db01..feaf107934 100644 --- a/packages/pl-fe/src/api/hooks/statuses/useDeleteBookmarkFolder.ts +++ b/packages/pl-fe/src/api/hooks/statuses/use-delete-bookmark-folder.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useDeleteEntity } from 'pl-fe/entity-store/hooks/useDeleteEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useDeleteEntity } from 'pl-fe/entity-store/hooks/use-delete-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; const useDeleteBookmarkFolder = () => { const client = useClient(); diff --git a/packages/pl-fe/src/api/hooks/statuses/useUpdateBookmarkFolder.ts b/packages/pl-fe/src/api/hooks/statuses/use-update-bookmark-folder.ts similarity index 80% rename from packages/pl-fe/src/api/hooks/statuses/useUpdateBookmarkFolder.ts rename to packages/pl-fe/src/api/hooks/statuses/use-update-bookmark-folder.ts index 955690f8ee..4fa91b7845 100644 --- a/packages/pl-fe/src/api/hooks/statuses/useUpdateBookmarkFolder.ts +++ b/packages/pl-fe/src/api/hooks/statuses/use-update-bookmark-folder.ts @@ -1,6 +1,6 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useCreateEntity } from 'pl-fe/entity-store/hooks/use-create-entity'; +import { useClient } from 'pl-fe/hooks/use-client'; interface UpdateBookmarkFolderParams { name: string; diff --git a/packages/pl-fe/src/api/hooks/streaming/useCommunityStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-community-stream.ts similarity index 82% rename from packages/pl-fe/src/api/hooks/streaming/useCommunityStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-community-stream.ts index 4de3dcdc0d..7ec2606872 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useCommunityStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-community-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; interface UseCommunityStreamOpts { onlyMedia?: boolean; diff --git a/packages/pl-fe/src/api/hooks/streaming/useDirectStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-direct-stream.ts similarity index 60% rename from packages/pl-fe/src/api/hooks/streaming/useDirectStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-direct-stream.ts index 5ef2ca45cf..995cabe76c 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useDirectStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-direct-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; const useDirectStream = () => useTimelineStream('direct'); diff --git a/packages/pl-fe/src/api/hooks/streaming/useGroupStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-group-stream.ts similarity index 68% rename from packages/pl-fe/src/api/hooks/streaming/useGroupStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-group-stream.ts index a2e9a0a6ee..4092cc6a51 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useGroupStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-group-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; const useGroupStream = (groupId: string) => useTimelineStream('group', { group: groupId } as any); diff --git a/packages/pl-fe/src/api/hooks/streaming/useHashtagStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-hashtag-stream.ts similarity index 65% rename from packages/pl-fe/src/api/hooks/streaming/useHashtagStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-hashtag-stream.ts index 77e5517cf3..9cd4d4115a 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useHashtagStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-hashtag-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; const useHashtagStream = (tag: string) => useTimelineStream('hashtag', { tag }); diff --git a/packages/pl-fe/src/api/hooks/streaming/useListStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-list-stream.ts similarity index 61% rename from packages/pl-fe/src/api/hooks/streaming/useListStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-list-stream.ts index 95bb114f85..fde472b2aa 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useListStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-list-stream.ts @@ -1,6 +1,6 @@ -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; const useListStream = (listId: string) => { const { isLoggedIn } = useLoggedIn(); diff --git a/packages/pl-fe/src/api/hooks/streaming/usePublicStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-public-stream.ts similarity index 78% rename from packages/pl-fe/src/api/hooks/streaming/usePublicStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-public-stream.ts index 30c523e20d..18b2a6a8a0 100644 --- a/packages/pl-fe/src/api/hooks/streaming/usePublicStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-public-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; interface UsePublicStreamOpts { onlyMedia?: boolean; diff --git a/packages/pl-fe/src/api/hooks/streaming/useRemoteStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-remote-stream.ts similarity index 82% rename from packages/pl-fe/src/api/hooks/streaming/useRemoteStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-remote-stream.ts index a7435feb91..402f693c95 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useRemoteStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-remote-stream.ts @@ -1,4 +1,4 @@ -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; interface UseRemoteStreamOpts { instance: string; diff --git a/packages/pl-fe/src/api/hooks/streaming/useTimelineStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-timeline-stream.ts similarity index 92% rename from packages/pl-fe/src/api/hooks/streaming/useTimelineStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-timeline-stream.ts index ce94aca466..07c2a140a3 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useTimelineStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-timeline-stream.ts @@ -1,8 +1,8 @@ import { useEffect, useRef } from 'react'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { getAccessToken } from 'pl-fe/utils/auth'; import type { StreamingEvent } from 'pl-api'; diff --git a/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts b/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts similarity index 95% rename from packages/pl-fe/src/api/hooks/streaming/useUserStream.ts rename to packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts index 35c3aca81f..eb717f8bde 100644 --- a/packages/pl-fe/src/api/hooks/streaming/useUserStream.ts +++ b/packages/pl-fe/src/api/hooks/streaming/use-user-stream.ts @@ -11,17 +11,17 @@ import { useStatContext } from 'pl-fe/contexts/stat-context'; import { importEntities } from 'pl-fe/entity-store/actions'; import { Entities } from 'pl-fe/entity-store/entities'; import { selectEntity } from 'pl-fe/entity-store/selectors'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import messages from 'pl-fe/messages'; import { queryClient } from 'pl-fe/queries/client'; import { useSettingsStore } from 'pl-fe/stores/settings'; import { getUnreadChatsCount, updateChatListItem } from 'pl-fe/utils/chats'; import { play, soundCache } from 'pl-fe/utils/sounds'; -import { updateReactions } from '../announcements/useAnnouncements'; +import { updateReactions } from '../announcements/use-announcements'; -import { useTimelineStream } from './useTimelineStream'; +import { useTimelineStream } from './use-timeline-stream'; import type { Announcement, AnnouncementReaction, FollowRelationshipUpdate, Relationship, StreamingEvent } from 'pl-api'; import type { AppDispatch, RootState } from 'pl-fe/store'; diff --git a/packages/pl-fe/src/api/hooks/trends/useTrendingLinks.ts b/packages/pl-fe/src/api/hooks/trends/use-trending-links.ts similarity index 71% rename from packages/pl-fe/src/api/hooks/trends/useTrendingLinks.ts rename to packages/pl-fe/src/api/hooks/trends/use-trending-links.ts index 9eaa55af1f..9d7d31fc37 100644 --- a/packages/pl-fe/src/api/hooks/trends/useTrendingLinks.ts +++ b/packages/pl-fe/src/api/hooks/trends/use-trending-links.ts @@ -1,7 +1,7 @@ import { Entities } from 'pl-fe/entity-store/entities'; -import { useEntities } from 'pl-fe/entity-store/hooks/useEntities'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useEntities } from 'pl-fe/entity-store/hooks/use-entities'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { TrendsLink } from 'pl-api'; diff --git a/packages/pl-fe/src/components/account-hover-card.tsx b/packages/pl-fe/src/components/account-hover-card.tsx index 0426fba86e..1286f798a2 100644 --- a/packages/pl-fe/src/components/account-hover-card.tsx +++ b/packages/pl-fe/src/components/account-hover-card.tsx @@ -5,7 +5,7 @@ import { useIntl, FormattedMessage } from 'react-intl'; import { useHistory } from 'react-router-dom'; import { fetchRelationships } from 'pl-fe/actions/accounts'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Badge from 'pl-fe/components/badge'; import Card, { CardBody } from 'pl-fe/components/ui/card'; import HStack from 'pl-fe/components/ui/hstack'; @@ -14,8 +14,8 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import ActionButton from 'pl-fe/features/ui/components/action-button'; import { UserPanel } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useAccountHoverCardStore } from 'pl-fe/stores/account-hover-card'; import { showAccountHoverCard } from './hover-account-wrapper'; diff --git a/packages/pl-fe/src/components/account.tsx b/packages/pl-fe/src/components/account.tsx index affda2e66f..d4b52b06cc 100644 --- a/packages/pl-fe/src/components/account.tsx +++ b/packages/pl-fe/src/components/account.tsx @@ -13,7 +13,7 @@ import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import Emojify from 'pl-fe/features/emoji/emojify'; import ActionButton from 'pl-fe/features/ui/components/action-button'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { getAcct } from 'pl-fe/utils/accounts'; import { displayFqn } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/components/animated-number.tsx b/packages/pl-fe/src/components/animated-number.tsx index f359940a46..6d7df23e88 100644 --- a/packages/pl-fe/src/components/animated-number.tsx +++ b/packages/pl-fe/src/components/animated-number.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { useIntl, type IntlShape } from 'react-intl'; import { TransitionMotion, spring } from 'react-motion'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { isNumber, roundDown } from 'pl-fe/utils/numbers'; const obfuscatedCount = (count: number): string => { diff --git a/packages/pl-fe/src/components/announcements/announcement.tsx b/packages/pl-fe/src/components/announcements/announcement.tsx index c99cb63857..f0536fec23 100644 --- a/packages/pl-fe/src/components/announcements/announcement.tsx +++ b/packages/pl-fe/src/components/announcements/announcement.tsx @@ -3,7 +3,7 @@ import { FormattedDate } from 'react-intl'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { getTextDirection } from 'pl-fe/utils/rtl'; import AnnouncementContent from './announcement-content'; diff --git a/packages/pl-fe/src/components/announcements/announcements-panel.tsx b/packages/pl-fe/src/components/announcements/announcements-panel.tsx index c01e0433d2..558b99a38f 100644 --- a/packages/pl-fe/src/components/announcements/announcements-panel.tsx +++ b/packages/pl-fe/src/components/announcements/announcements-panel.tsx @@ -5,11 +5,11 @@ import { FormattedMessage } from 'react-intl'; import ReactSwipeableViews from 'react-swipeable-views'; import { createSelector } from 'reselect'; -import { useAnnouncements } from 'pl-fe/api/hooks/announcements/useAnnouncements'; +import { useAnnouncements } from 'pl-fe/api/hooks/announcements/use-announcements'; import Card from 'pl-fe/components/ui/card'; import HStack from 'pl-fe/components/ui/hstack'; import Widget from 'pl-fe/components/ui/widget'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import Announcement from './announcement'; diff --git a/packages/pl-fe/src/components/announcements/emoji.tsx b/packages/pl-fe/src/components/announcements/emoji.tsx index 44b918cf55..cc2de4f896 100644 --- a/packages/pl-fe/src/components/announcements/emoji.tsx +++ b/packages/pl-fe/src/components/announcements/emoji.tsx @@ -1,7 +1,7 @@ import React from 'react'; import unicodeMapping from 'pl-fe/features/emoji/mapping'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { joinPublicPath } from 'pl-fe/utils/static'; import type { Map as ImmutableMap } from 'immutable'; diff --git a/packages/pl-fe/src/components/announcements/reaction.tsx b/packages/pl-fe/src/components/announcements/reaction.tsx index 0664e71312..983e774c58 100644 --- a/packages/pl-fe/src/components/announcements/reaction.tsx +++ b/packages/pl-fe/src/components/announcements/reaction.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { useState } from 'react'; -import { useAnnouncements } from 'pl-fe/api/hooks/announcements/useAnnouncements'; +import { useAnnouncements } from 'pl-fe/api/hooks/announcements/use-announcements'; import AnimatedNumber from 'pl-fe/components/animated-number'; import unicodeMapping from 'pl-fe/features/emoji/mapping'; diff --git a/packages/pl-fe/src/components/announcements/reactions-bar.tsx b/packages/pl-fe/src/components/announcements/reactions-bar.tsx index cbb8f079bd..36b6056267 100644 --- a/packages/pl-fe/src/components/announcements/reactions-bar.tsx +++ b/packages/pl-fe/src/components/announcements/reactions-bar.tsx @@ -2,9 +2,9 @@ import clsx from 'clsx'; import React from 'react'; import { TransitionMotion, spring } from 'react-motion'; -import { useAnnouncements } from 'pl-fe/api/hooks/announcements/useAnnouncements'; +import { useAnnouncements } from 'pl-fe/api/hooks/announcements/use-announcements'; import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import Reaction from './reaction'; diff --git a/packages/pl-fe/src/components/attachment-thumbs.tsx b/packages/pl-fe/src/components/attachment-thumbs.tsx index 7ce15ca65e..1129afd21f 100644 --- a/packages/pl-fe/src/components/attachment-thumbs.tsx +++ b/packages/pl-fe/src/components/attachment-thumbs.tsx @@ -1,7 +1,7 @@ import React, { Suspense } from 'react'; import { MediaGallery } from 'pl-fe/features/ui/util/async-components'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import { isMediaVisible } from './statuses/sensitive-content-overlay'; diff --git a/packages/pl-fe/src/components/autosuggest-account-input.tsx b/packages/pl-fe/src/components/autosuggest-account-input.tsx index c002189a07..ed166d14ed 100644 --- a/packages/pl-fe/src/components/autosuggest-account-input.tsx +++ b/packages/pl-fe/src/components/autosuggest-account-input.tsx @@ -4,7 +4,7 @@ import React, { useState, useRef, useCallback, useEffect } from 'react'; import { accountSearch } from 'pl-fe/actions/accounts'; import AutosuggestInput, { AutoSuggestion } from 'pl-fe/components/autosuggest-input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import type { Menu } from 'pl-fe/components/dropdown-menu'; import type { InputThemes } from 'pl-fe/components/ui/input'; diff --git a/packages/pl-fe/src/components/autosuggest-location.tsx b/packages/pl-fe/src/components/autosuggest-location.tsx index 06dba47d32..77f9f30ec8 100644 --- a/packages/pl-fe/src/components/autosuggest-location.tsx +++ b/packages/pl-fe/src/components/autosuggest-location.tsx @@ -4,7 +4,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const buildingCommunityIcon = require('@tabler/icons/outline/building-community.svg'); const homeIcon = require('@tabler/icons/outline/home-2.svg'); diff --git a/packages/pl-fe/src/components/avatar-stack.tsx b/packages/pl-fe/src/components/avatar-stack.tsx index 9f367d201c..6cfd85065a 100644 --- a/packages/pl-fe/src/components/avatar-stack.tsx +++ b/packages/pl-fe/src/components/avatar-stack.tsx @@ -4,7 +4,7 @@ import React from 'react'; import Avatar from 'pl-fe/components/ui/avatar'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetAccount } from 'pl-fe/selectors'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/components/birthday-input.tsx b/packages/pl-fe/src/components/birthday-input.tsx index 0ddae1780d..7928abf9d3 100644 --- a/packages/pl-fe/src/components/birthday-input.tsx +++ b/packages/pl-fe/src/components/birthday-input.tsx @@ -3,8 +3,8 @@ import { defineMessages, useIntl } from 'react-intl'; import IconButton from 'pl-fe/components/icon-button'; import { DatePicker } from 'pl-fe/features/ui/util/async-components'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; const messages = defineMessages({ birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' }, diff --git a/packages/pl-fe/src/components/birthday-panel.tsx b/packages/pl-fe/src/components/birthday-panel.tsx index c3ef42c057..1e1d579a43 100644 --- a/packages/pl-fe/src/components/birthday-panel.tsx +++ b/packages/pl-fe/src/components/birthday-panel.tsx @@ -5,8 +5,8 @@ import { FormattedMessage } from 'react-intl'; import { fetchBirthdayReminders } from 'pl-fe/actions/accounts'; import Widget from 'pl-fe/components/ui/widget'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const timeToMidnight = () => { const now = new Date(); diff --git a/packages/pl-fe/src/components/domain.tsx b/packages/pl-fe/src/components/domain.tsx index 8af041f169..ec7c899cbb 100644 --- a/packages/pl-fe/src/components/domain.tsx +++ b/packages/pl-fe/src/components/domain.tsx @@ -5,7 +5,7 @@ import { unblockDomain } from 'pl-fe/actions/domain-blocks'; import HStack from 'pl-fe/components/ui/hstack'; import IconButton from 'pl-fe/components/ui/icon-button'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; const messages = defineMessages({ blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' }, diff --git a/packages/pl-fe/src/components/event-preview.tsx b/packages/pl-fe/src/components/event-preview.tsx index c952cbdb7b..81692d410f 100644 --- a/packages/pl-fe/src/components/event-preview.tsx +++ b/packages/pl-fe/src/components/event-preview.tsx @@ -11,7 +11,7 @@ import VerificationBadge from 'pl-fe/components/verification-badge'; import Emojify from 'pl-fe/features/emoji/emojify'; import EventActionButton from 'pl-fe/features/event/components/event-action-button'; import EventDate from 'pl-fe/features/event/components/event-date'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { Status as StatusEntity } from 'pl-fe/normalizers/status'; diff --git a/packages/pl-fe/src/components/gdpr-banner.tsx b/packages/pl-fe/src/components/gdpr-banner.tsx index 3dec3dbf5d..0f86c8e2d8 100644 --- a/packages/pl-fe/src/components/gdpr-banner.tsx +++ b/packages/pl-fe/src/components/gdpr-banner.tsx @@ -7,8 +7,8 @@ import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; const acceptedGdpr = !!localStorage.getItem('plfe:gdpr'); diff --git a/packages/pl-fe/src/components/helmet.tsx b/packages/pl-fe/src/components/helmet.tsx index 7e5be97a52..7823e21bd8 100644 --- a/packages/pl-fe/src/components/helmet.tsx +++ b/packages/pl-fe/src/components/helmet.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { Helmet as ReactHelmet } from 'react-helmet-async'; import { useStatContext } from 'pl-fe/contexts/stat-context'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { RootState } from 'pl-fe/store'; import FaviconService from 'pl-fe/utils/favicon-service'; diff --git a/packages/pl-fe/src/components/hover-account-wrapper.tsx b/packages/pl-fe/src/components/hover-account-wrapper.tsx index 3e7886d431..057c01a617 100644 --- a/packages/pl-fe/src/components/hover-account-wrapper.tsx +++ b/packages/pl-fe/src/components/hover-account-wrapper.tsx @@ -3,7 +3,7 @@ import debounce from 'lodash/debounce'; import React, { useRef } from 'react'; import { fetchAccount } from 'pl-fe/actions/accounts'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { isMobile } from 'pl-fe/is-mobile'; import { useAccountHoverCardStore } from 'pl-fe/stores/account-hover-card'; diff --git a/packages/pl-fe/src/components/location-search.tsx b/packages/pl-fe/src/components/location-search.tsx index 4ee53f9b3d..444c7c25c6 100644 --- a/packages/pl-fe/src/components/location-search.tsx +++ b/packages/pl-fe/src/components/location-search.tsx @@ -7,7 +7,7 @@ import { defineMessages, useIntl } from 'react-intl'; import { locationSearch } from 'pl-fe/actions/events'; import AutosuggestInput, { AutoSuggestion } from 'pl-fe/components/autosuggest-input'; import Icon from 'pl-fe/components/icon'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import AutosuggestLocation from './autosuggest-location'; diff --git a/packages/pl-fe/src/components/media-gallery.tsx b/packages/pl-fe/src/components/media-gallery.tsx index af99025bb8..78124f4a44 100644 --- a/packages/pl-fe/src/components/media-gallery.tsx +++ b/packages/pl-fe/src/components/media-gallery.tsx @@ -5,8 +5,8 @@ import Blurhash from 'pl-fe/components/blurhash'; import Icon from 'pl-fe/components/icon'; import StillImage from 'pl-fe/components/still-image'; import { MIMETYPE_ICONS } from 'pl-fe/components/upload'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { truncateFilename } from 'pl-fe/utils/media'; import { isIOS } from '../is-mobile'; diff --git a/packages/pl-fe/src/components/modal-root.tsx b/packages/pl-fe/src/components/modal-root.tsx index e223a819a8..d0e1f57d42 100644 --- a/packages/pl-fe/src/components/modal-root.tsx +++ b/packages/pl-fe/src/components/modal-root.tsx @@ -5,8 +5,8 @@ import { useHistory } from 'react-router-dom'; import { cancelReplyCompose } from 'pl-fe/actions/compose'; import { saveDraftStatus } from 'pl-fe/actions/draft-statuses'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { usePrevious } from 'pl-fe/hooks/usePrevious'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { usePrevious } from 'pl-fe/hooks/use-previous'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { ModalType } from 'pl-fe/features/ui/components/modal-root'; diff --git a/packages/pl-fe/src/components/navlinks.tsx b/packages/pl-fe/src/components/navlinks.tsx index 84dc687356..ee84fd1507 100644 --- a/packages/pl-fe/src/components/navlinks.tsx +++ b/packages/pl-fe/src/components/navlinks.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { Link } from 'react-router-dom'; import Text from 'pl-fe/components/ui/text'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface INavlinks { type: string; diff --git a/packages/pl-fe/src/components/polls/poll-footer.tsx b/packages/pl-fe/src/components/polls/poll-footer.tsx index b63aaa4a53..f9aeccb431 100644 --- a/packages/pl-fe/src/components/polls/poll-footer.tsx +++ b/packages/pl-fe/src/components/polls/poll-footer.tsx @@ -7,7 +7,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Tooltip from 'pl-fe/components/ui/tooltip'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import RelativeTimestamp from '../relative-timestamp'; diff --git a/packages/pl-fe/src/components/polls/poll.tsx b/packages/pl-fe/src/components/polls/poll.tsx index 71c7efb304..efe4fdff0c 100644 --- a/packages/pl-fe/src/components/polls/poll.tsx +++ b/packages/pl-fe/src/components/polls/poll.tsx @@ -4,8 +4,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { vote } from 'pl-fe/actions/polls'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import PollFooter from './poll-footer'; diff --git a/packages/pl-fe/src/components/quoted-status-indicator.tsx b/packages/pl-fe/src/components/quoted-status-indicator.tsx index 9dc6992149..b88eae6529 100644 --- a/packages/pl-fe/src/components/quoted-status-indicator.tsx +++ b/packages/pl-fe/src/components/quoted-status-indicator.tsx @@ -3,7 +3,7 @@ import React, { useCallback } from 'react'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Text from 'pl-fe/components/ui/text'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; interface IQuotedStatusIndicator { diff --git a/packages/pl-fe/src/components/scroll-top-button.tsx b/packages/pl-fe/src/components/scroll-top-button.tsx index f0d517231c..b1d9794cde 100644 --- a/packages/pl-fe/src/components/scroll-top-button.tsx +++ b/packages/pl-fe/src/components/scroll-top-button.tsx @@ -4,7 +4,7 @@ import { useIntl, MessageDescriptor } from 'react-intl'; import Icon from 'pl-fe/components/ui/icon'; import Text from 'pl-fe/components/ui/text'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IScrollTopButton { /** Callback when clicked, and also when scrolled to the top. */ diff --git a/packages/pl-fe/src/components/scrollable-list.tsx b/packages/pl-fe/src/components/scrollable-list.tsx index 4f3d34b5f5..db0c9a8c00 100644 --- a/packages/pl-fe/src/components/scrollable-list.tsx +++ b/packages/pl-fe/src/components/scrollable-list.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useRef } from 'react'; import LoadMore from 'pl-fe/components/load-more'; import Card from 'pl-fe/components/ui/card'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IScrollableListBase { /** Pagination callback when the end of the list is reached. */ diff --git a/packages/pl-fe/src/components/sentry-feedback-form.tsx b/packages/pl-fe/src/components/sentry-feedback-form.tsx index 1c295ee9f3..6e97566302 100644 --- a/packages/pl-fe/src/components/sentry-feedback-form.tsx +++ b/packages/pl-fe/src/components/sentry-feedback-form.tsx @@ -7,7 +7,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Text from 'pl-fe/components/ui/text'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { captureSentryFeedback } from 'pl-fe/sentry'; interface ISentryFeedbackForm { diff --git a/packages/pl-fe/src/components/sidebar-menu.tsx b/packages/pl-fe/src/components/sidebar-menu.tsx index 9420042d19..90e51a2b56 100644 --- a/packages/pl-fe/src/components/sidebar-menu.tsx +++ b/packages/pl-fe/src/components/sidebar-menu.tsx @@ -5,7 +5,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import { Link, NavLink } from 'react-router-dom'; import { fetchOwnAccounts, logOut, switchAccount } from 'pl-fe/actions/auth'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Account from 'pl-fe/components/account'; import Divider from 'pl-fe/components/ui/divider'; import HStack from 'pl-fe/components/ui/hstack'; @@ -13,11 +13,11 @@ import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import ProfileStats from 'pl-fe/features/ui/components/profile-stats'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useRegistrationStatus } from 'pl-fe/hooks/use-registration-status'; import { makeGetOtherAccounts } from 'pl-fe/selectors'; import { useSettingsStore } from 'pl-fe/stores/settings'; import { useUiStore } from 'pl-fe/stores/ui'; diff --git a/packages/pl-fe/src/components/sidebar-navigation-link.tsx b/packages/pl-fe/src/components/sidebar-navigation-link.tsx index 8b66abf635..d26e7b8985 100644 --- a/packages/pl-fe/src/components/sidebar-navigation-link.tsx +++ b/packages/pl-fe/src/components/sidebar-navigation-link.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React from 'react'; import { NavLink } from 'react-router-dom'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import Icon from './ui/icon'; import Text from './ui/text'; diff --git a/packages/pl-fe/src/components/sidebar-navigation.tsx b/packages/pl-fe/src/components/sidebar-navigation.tsx index a23e56246a..75e628ef96 100644 --- a/packages/pl-fe/src/components/sidebar-navigation.tsx +++ b/packages/pl-fe/src/components/sidebar-navigation.tsx @@ -7,13 +7,13 @@ import { useStatContext } from 'pl-fe/contexts/stat-context'; import Search from 'pl-fe/features/search/components/search'; import ComposeButton from 'pl-fe/features/ui/components/compose-button'; import ProfileDropdown from 'pl-fe/features/ui/components/profile-dropdown'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useLogo } from 'pl-fe/hooks/useLogo'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useLogo } from 'pl-fe/hooks/use-logo'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { useRegistrationStatus } from 'pl-fe/hooks/use-registration-status'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import Account from './account'; import DropdownMenu, { Menu } from './dropdown-menu'; diff --git a/packages/pl-fe/src/components/site-error-boundary.tsx b/packages/pl-fe/src/components/site-error-boundary.tsx index 3a76e3b40c..2b2ce2241f 100644 --- a/packages/pl-fe/src/components/site-error-boundary.tsx +++ b/packages/pl-fe/src/components/site-error-boundary.tsx @@ -7,8 +7,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useLogo } from 'pl-fe/hooks/useLogo'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useLogo } from 'pl-fe/hooks/use-logo'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { captureSentryException } from 'pl-fe/sentry'; import KVStore from 'pl-fe/storage/kv-store'; import sourceCode from 'pl-fe/utils/code'; diff --git a/packages/pl-fe/src/components/site-logo.tsx b/packages/pl-fe/src/components/site-logo.tsx index b194be332d..83336a3acf 100644 --- a/packages/pl-fe/src/components/site-logo.tsx +++ b/packages/pl-fe/src/components/site-logo.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useLogo } from 'pl-fe/hooks/useLogo'; +import { useLogo } from 'pl-fe/hooks/use-logo'; const messages = defineMessages({ logo: { id: 'generic.logo', defaultMessage: 'Logo' }, diff --git a/packages/pl-fe/src/components/status-action-bar.tsx b/packages/pl-fe/src/components/status-action-bar.tsx index 946752cf89..d56ca7f67b 100644 --- a/packages/pl-fe/src/components/status-action-bar.tsx +++ b/packages/pl-fe/src/components/status-action-bar.tsx @@ -14,22 +14,22 @@ import { initReport, ReportableEntities } from 'pl-fe/actions/reports'; import { changeSetting } from 'pl-fe/actions/settings'; import { deleteStatus, editStatus, toggleMuteStatus, translateStatus, undoStatusTranslation } from 'pl-fe/actions/statuses'; import { deleteFromTimelines } from 'pl-fe/actions/timelines'; -import { useBlockGroupMember } from 'pl-fe/api/hooks/groups/useBlockGroupMember'; -import { useDeleteGroupStatus } from 'pl-fe/api/hooks/groups/useDeleteGroupStatus'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupRelationship } from 'pl-fe/api/hooks/groups/useGroupRelationship'; -import { useTranslationLanguages } from 'pl-fe/api/hooks/instance/useTranslationLanguages'; +import { useBlockGroupMember } from 'pl-fe/api/hooks/groups/use-block-group-member'; +import { useDeleteGroupStatus } from 'pl-fe/api/hooks/groups/use-delete-group-status'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupRelationship } from 'pl-fe/api/hooks/groups/use-group-relationship'; +import { useTranslationLanguages } from 'pl-fe/api/hooks/instance/use-translation-languages'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import StatusActionButton from 'pl-fe/components/status-action-button'; import HStack from 'pl-fe/components/ui/hstack'; import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; import { languages } from 'pl-fe/features/preferences'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useChats } from 'pl-fe/queries/chats'; import { useModalsStore } from 'pl-fe/stores/modals'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/components/status-action-button.tsx b/packages/pl-fe/src/components/status-action-button.tsx index 450dd3f7a5..e1bf3f0074 100644 --- a/packages/pl-fe/src/components/status-action-button.tsx +++ b/packages/pl-fe/src/components/status-action-button.tsx @@ -5,7 +5,7 @@ import React from 'react'; import Emoji from 'pl-fe/components/ui/emoji'; import Icon from 'pl-fe/components/ui/icon'; import Text from 'pl-fe/components/ui/text'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import AnimatedNumber from './animated-number'; diff --git a/packages/pl-fe/src/components/status-content.tsx b/packages/pl-fe/src/components/status-content.tsx index ad54c7dbf9..c1e0795bcd 100644 --- a/packages/pl-fe/src/components/status-content.tsx +++ b/packages/pl-fe/src/components/status-content.tsx @@ -8,8 +8,8 @@ import Button from 'pl-fe/components/ui/button'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { onlyEmoji as isOnlyEmoji } from 'pl-fe/utils/rich-content'; import { getTextDirection } from '../utils/rtl'; diff --git a/packages/pl-fe/src/components/status-hover-card.tsx b/packages/pl-fe/src/components/status-hover-card.tsx index 2991259196..380a5f478f 100644 --- a/packages/pl-fe/src/components/status-hover-card.tsx +++ b/packages/pl-fe/src/components/status-hover-card.tsx @@ -8,8 +8,8 @@ import { fetchStatus } from 'pl-fe/actions/statuses'; import { showStatusHoverCard } from 'pl-fe/components/hover-status-wrapper'; import Card, { CardBody } from 'pl-fe/components/ui/card'; import StatusContainer from 'pl-fe/containers/status-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useStatusHoverCardStore } from 'pl-fe/stores/status-hover-card'; interface IStatusHoverCard { diff --git a/packages/pl-fe/src/components/status-language-picker.tsx b/packages/pl-fe/src/components/status-language-picker.tsx index 396e6f1788..12af6318b0 100644 --- a/packages/pl-fe/src/components/status-language-picker.tsx +++ b/packages/pl-fe/src/components/status-language-picker.tsx @@ -6,7 +6,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Text from 'pl-fe/components/ui/text'; import { type Language, languages } from 'pl-fe/features/preferences'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import DropdownMenu from './dropdown-menu'; diff --git a/packages/pl-fe/src/components/status-list.tsx b/packages/pl-fe/src/components/status-list.tsx index 8b287db358..1828835989 100644 --- a/packages/pl-fe/src/components/status-list.tsx +++ b/packages/pl-fe/src/components/status-list.tsx @@ -12,7 +12,7 @@ import StatusContainer from 'pl-fe/containers/status-container'; import FeedSuggestions from 'pl-fe/features/feed-suggestions/feed-suggestions'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; import PendingStatus from 'pl-fe/features/ui/components/pending-status'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; interface IStatusList extends Omit { /** Unique key to preserve the scroll position when navigating back. */ diff --git a/packages/pl-fe/src/components/status-media.tsx b/packages/pl-fe/src/components/status-media.tsx index f0cf4e7e6b..63c241fc22 100644 --- a/packages/pl-fe/src/components/status-media.tsx +++ b/packages/pl-fe/src/components/status-media.tsx @@ -4,7 +4,7 @@ import AttachmentThumbs from 'pl-fe/components/attachment-thumbs'; import PreviewCard from 'pl-fe/components/preview-card'; import PlaceholderCard from 'pl-fe/features/placeholder/components/placeholder-card'; import { MediaGallery, Video, Audio } from 'pl-fe/features/ui/util/async-components'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import { isMediaVisible } from './statuses/sensitive-content-overlay'; diff --git a/packages/pl-fe/src/components/status-mention.tsx b/packages/pl-fe/src/components/status-mention.tsx index d0b0023979..5fdd267d28 100644 --- a/packages/pl-fe/src/components/status-mention.tsx +++ b/packages/pl-fe/src/components/status-mention.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import HoverAccountWrapper from './hover-account-wrapper'; diff --git a/packages/pl-fe/src/components/status-reactions-bar.tsx b/packages/pl-fe/src/components/status-reactions-bar.tsx index 032357b133..3fccfe4662 100644 --- a/packages/pl-fe/src/components/status-reactions-bar.tsx +++ b/packages/pl-fe/src/components/status-reactions-bar.tsx @@ -10,10 +10,10 @@ import Icon from 'pl-fe/components/ui/icon'; import Text from 'pl-fe/components/ui/text'; import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; import unicodeMapping from 'pl-fe/features/emoji/mapping'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import AnimatedNumber from './animated-number'; diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index 67812204d8..e8ef7344c8 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -16,9 +16,9 @@ import Emojify from 'pl-fe/features/emoji/emojify'; import StatusTypeIcon from 'pl-fe/features/status/components/status-type-icon'; import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container'; import { HotKeys } from 'pl-fe/features/ui/components/hotkeys'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { makeGetStatus, type SelectedStatus } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; import { textForScreenReader } from 'pl-fe/utils/status'; diff --git a/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx b/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx index 9217b436d0..c122478092 100644 --- a/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx +++ b/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx @@ -6,8 +6,8 @@ import { hideStatusMedia, revealStatusMedia } from 'pl-fe/actions/statuses'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import type { Status } from 'pl-fe/normalizers/status'; diff --git a/packages/pl-fe/src/components/still-image.tsx b/packages/pl-fe/src/components/still-image.tsx index 36850bdf7f..fd4c272176 100644 --- a/packages/pl-fe/src/components/still-image.tsx +++ b/packages/pl-fe/src/components/still-image.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import React, { useRef } from 'react'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IStillImage { /** Image alt text. */ diff --git a/packages/pl-fe/src/components/thumb-navigation-link.tsx b/packages/pl-fe/src/components/thumb-navigation-link.tsx index 22f8af635c..a1d92b13b6 100644 --- a/packages/pl-fe/src/components/thumb-navigation-link.tsx +++ b/packages/pl-fe/src/components/thumb-navigation-link.tsx @@ -4,7 +4,7 @@ import { NavLink, useLocation } from 'react-router-dom'; import IconWithCounter from 'pl-fe/components/icon-with-counter'; import Icon from 'pl-fe/components/ui/icon'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IThumbNavigationLink { count?: number; diff --git a/packages/pl-fe/src/components/thumb-navigation.tsx b/packages/pl-fe/src/components/thumb-navigation.tsx index adfca83166..f2f18e4e7b 100644 --- a/packages/pl-fe/src/components/thumb-navigation.tsx +++ b/packages/pl-fe/src/components/thumb-navigation.tsx @@ -7,10 +7,10 @@ import ThumbNavigationLink from 'pl-fe/components/thumb-navigation-link'; import Icon from 'pl-fe/components/ui/icon'; import { useStatContext } from 'pl-fe/contexts/stat-context'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { useModalsStore } from 'pl-fe/stores/modals'; import { useUiStore } from 'pl-fe/stores/ui'; import { isStandalone } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/components/translate-button.tsx b/packages/pl-fe/src/components/translate-button.tsx index f91a306c7a..e9f85166ff 100644 --- a/packages/pl-fe/src/components/translate-button.tsx +++ b/packages/pl-fe/src/components/translate-button.tsx @@ -2,16 +2,16 @@ import React, { useEffect } from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { translateStatus, undoStatusTranslation } from 'pl-fe/actions/statuses'; -import { useTranslationLanguages } from 'pl-fe/api/hooks/instance/useTranslationLanguages'; +import { useTranslationLanguages } from 'pl-fe/api/hooks/instance/use-translation-languages'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import type { Status } from 'pl-fe/normalizers/status'; diff --git a/packages/pl-fe/src/components/ui/column.tsx b/packages/pl-fe/src/components/ui/column.tsx index 3d76ad856d..48d3f954e2 100644 --- a/packages/pl-fe/src/components/ui/column.tsx +++ b/packages/pl-fe/src/components/ui/column.tsx @@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import Helmet from 'pl-fe/components/helmet'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { Card, CardBody, CardHeader, CardTitle, type CardSizes } from './card'; diff --git a/packages/pl-fe/src/components/ui/input.tsx b/packages/pl-fe/src/components/ui/input.tsx index 8fc89ce384..6d2434140d 100644 --- a/packages/pl-fe/src/components/ui/input.tsx +++ b/packages/pl-fe/src/components/ui/input.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useLocale } from 'pl-fe/hooks/useLocale'; +import { useLocale } from 'pl-fe/hooks/use-locale'; import { getTextDirection } from 'pl-fe/utils/rtl'; import Icon from './icon'; diff --git a/packages/pl-fe/src/components/ui/layout.tsx b/packages/pl-fe/src/components/ui/layout.tsx index 836b1c4a84..86e4c29b30 100644 --- a/packages/pl-fe/src/components/ui/layout.tsx +++ b/packages/pl-fe/src/components/ui/layout.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React, { Suspense } from 'react'; import StickyBox from 'react-sticky-box'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface ISidebar { children: React.ReactNode; diff --git a/packages/pl-fe/src/components/ui/textarea.tsx b/packages/pl-fe/src/components/ui/textarea.tsx index 565452ccbe..5576ddf4f3 100644 --- a/packages/pl-fe/src/components/ui/textarea.tsx +++ b/packages/pl-fe/src/components/ui/textarea.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React, { useState } from 'react'; import { FormattedMessage } from 'react-intl'; -import { useLocale } from 'pl-fe/hooks/useLocale'; +import { useLocale } from 'pl-fe/hooks/use-locale'; import { getTextDirection } from 'pl-fe/utils/rtl'; import Stack from './stack'; diff --git a/packages/pl-fe/src/components/upload.tsx b/packages/pl-fe/src/components/upload.tsx index b0f756b4e1..095407f057 100644 --- a/packages/pl-fe/src/components/upload.tsx +++ b/packages/pl-fe/src/components/upload.tsx @@ -18,7 +18,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import IconButton from 'pl-fe/components/ui/icon-button'; import Motion from 'pl-fe/features/ui/util/optional-motion'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { MediaAttachment } from 'pl-api'; diff --git a/packages/pl-fe/src/components/verification-badge.tsx b/packages/pl-fe/src/components/verification-badge.tsx index 6604835966..886a2c0347 100644 --- a/packages/pl-fe/src/components/verification-badge.tsx +++ b/packages/pl-fe/src/components/verification-badge.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { useIntl, defineMessages } from 'react-intl'; import Icon from 'pl-fe/components/ui/icon'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; const messages = defineMessages({ verified: { id: 'account.verified', defaultMessage: 'Verified Account' }, diff --git a/packages/pl-fe/src/containers/account-container.tsx b/packages/pl-fe/src/containers/account-container.tsx index 8dc9b463cb..0fb237734d 100644 --- a/packages/pl-fe/src/containers/account-container.tsx +++ b/packages/pl-fe/src/containers/account-container.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Account, { IAccount } from 'pl-fe/components/account'; interface IAccountContainer extends Omit { diff --git a/packages/pl-fe/src/containers/status-container.tsx b/packages/pl-fe/src/containers/status-container.tsx index bac9121c84..1a71db2386 100644 --- a/packages/pl-fe/src/containers/status-container.tsx +++ b/packages/pl-fe/src/containers/status-container.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from 'react'; import Status, { IStatus } from 'pl-fe/components/status'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; interface IStatusContainer extends Omit { diff --git a/packages/pl-fe/src/contexts/chat-context.tsx b/packages/pl-fe/src/contexts/chat-context.tsx index 76141dc3e1..ad623593ec 100644 --- a/packages/pl-fe/src/contexts/chat-context.tsx +++ b/packages/pl-fe/src/contexts/chat-context.tsx @@ -2,8 +2,8 @@ import React, { createContext, useContext, useEffect, useMemo, useState } from ' import { useHistory, useParams } from 'react-router-dom'; import { toggleMainWindow } from 'pl-fe/actions/chats'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useChat } from 'pl-fe/queries/chats'; import type { Chat } from 'pl-api'; diff --git a/packages/pl-fe/src/entity-store/hooks/useBatchedEntities.ts b/packages/pl-fe/src/entity-store/hooks/use-batched-entities.ts similarity index 94% rename from packages/pl-fe/src/entity-store/hooks/useBatchedEntities.ts rename to packages/pl-fe/src/entity-store/hooks/use-batched-entities.ts index 40aa0f523b..cdb87f016b 100644 --- a/packages/pl-fe/src/entity-store/hooks/useBatchedEntities.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-batched-entities.ts @@ -1,9 +1,9 @@ import { useEffect } from 'react'; import * as v from 'valibot'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useGetState } from 'pl-fe/hooks/useGetState'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useGetState } from 'pl-fe/hooks/use-get-state'; import { filteredArray } from 'pl-fe/schemas/utils'; import { entitiesFetchFail, entitiesFetchRequest, entitiesFetchSuccess } from '../actions'; diff --git a/packages/pl-fe/src/entity-store/hooks/useCreateEntity.ts b/packages/pl-fe/src/entity-store/hooks/use-create-entity.ts similarity index 93% rename from packages/pl-fe/src/entity-store/hooks/useCreateEntity.ts rename to packages/pl-fe/src/entity-store/hooks/use-create-entity.ts index a7ff90741b..81edb991a7 100644 --- a/packages/pl-fe/src/entity-store/hooks/useCreateEntity.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-create-entity.ts @@ -1,7 +1,7 @@ import * as v from 'valibot'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useLoading } from 'pl-fe/hooks/useLoading'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useLoading } from 'pl-fe/hooks/use-loading'; import { importEntities } from '../actions'; diff --git a/packages/pl-fe/src/entity-store/hooks/useDeleteEntity.ts b/packages/pl-fe/src/entity-store/hooks/use-delete-entity.ts similarity index 89% rename from packages/pl-fe/src/entity-store/hooks/useDeleteEntity.ts rename to packages/pl-fe/src/entity-store/hooks/use-delete-entity.ts index 7fc6d9537d..60568d510a 100644 --- a/packages/pl-fe/src/entity-store/hooks/useDeleteEntity.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-delete-entity.ts @@ -1,6 +1,6 @@ -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useGetState } from 'pl-fe/hooks/useGetState'; -import { useLoading } from 'pl-fe/hooks/useLoading'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useGetState } from 'pl-fe/hooks/use-get-state'; +import { useLoading } from 'pl-fe/hooks/use-loading'; import { deleteEntities, importEntities } from '../actions'; diff --git a/packages/pl-fe/src/entity-store/hooks/useDismissEntity.ts b/packages/pl-fe/src/entity-store/hooks/use-dismiss-entity.ts similarity index 87% rename from packages/pl-fe/src/entity-store/hooks/useDismissEntity.ts rename to packages/pl-fe/src/entity-store/hooks/use-dismiss-entity.ts index b8fcd9c9a2..cd54fd2d39 100644 --- a/packages/pl-fe/src/entity-store/hooks/useDismissEntity.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-dismiss-entity.ts @@ -1,5 +1,5 @@ -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useLoading } from 'pl-fe/hooks/useLoading'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useLoading } from 'pl-fe/hooks/use-loading'; import { dismissEntities } from '../actions'; diff --git a/packages/pl-fe/src/entity-store/hooks/useEntities.ts b/packages/pl-fe/src/entity-store/hooks/use-entities.ts similarity index 96% rename from packages/pl-fe/src/entity-store/hooks/useEntities.ts rename to packages/pl-fe/src/entity-store/hooks/use-entities.ts index 158345d655..a33ddcfdfb 100644 --- a/packages/pl-fe/src/entity-store/hooks/useEntities.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-entities.ts @@ -1,9 +1,9 @@ import { useEffect } from 'react'; import * as v from 'valibot'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useGetState } from 'pl-fe/hooks/useGetState'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useGetState } from 'pl-fe/hooks/use-get-state'; import { filteredArray } from 'pl-fe/schemas/utils'; import { entitiesFetchFail, entitiesFetchRequest, entitiesFetchSuccess, invalidateEntityList } from '../actions'; diff --git a/packages/pl-fe/src/entity-store/hooks/useEntityLookup.ts b/packages/pl-fe/src/entity-store/hooks/use-entity-lookup.ts similarity index 89% rename from packages/pl-fe/src/entity-store/hooks/useEntityLookup.ts rename to packages/pl-fe/src/entity-store/hooks/use-entity-lookup.ts index a59be3c677..ce3859ce6f 100644 --- a/packages/pl-fe/src/entity-store/hooks/useEntityLookup.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-entity-lookup.ts @@ -1,15 +1,15 @@ import { useEffect, useState } from 'react'; import * as v from 'valibot'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLoading } from 'pl-fe/hooks/useLoading'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLoading } from 'pl-fe/hooks/use-loading'; import { importEntities } from '../actions'; import { findEntity } from '../selectors'; import type { EntityFn } from './types'; -import type { UseEntityOpts } from './useEntity'; +import type { UseEntityOpts } from './use-entity'; import type { Entity } from '../types'; import type { PlfeResponse } from 'pl-fe/api'; diff --git a/packages/pl-fe/src/entity-store/hooks/useEntity.ts b/packages/pl-fe/src/entity-store/hooks/use-entity.ts similarity index 92% rename from packages/pl-fe/src/entity-store/hooks/useEntity.ts rename to packages/pl-fe/src/entity-store/hooks/use-entity.ts index c4aba44ace..d65b8c4694 100644 --- a/packages/pl-fe/src/entity-store/hooks/useEntity.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-entity.ts @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; import * as v from 'valibot'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLoading } from 'pl-fe/hooks/useLoading'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLoading } from 'pl-fe/hooks/use-loading'; import { importEntities } from '../actions'; import { selectEntity } from '../selectors'; diff --git a/packages/pl-fe/src/entity-store/hooks/useTransaction.ts b/packages/pl-fe/src/entity-store/hooks/use-transaction.ts similarity index 90% rename from packages/pl-fe/src/entity-store/hooks/useTransaction.ts rename to packages/pl-fe/src/entity-store/hooks/use-transaction.ts index 374f34aebf..8900f5f1d0 100644 --- a/packages/pl-fe/src/entity-store/hooks/useTransaction.ts +++ b/packages/pl-fe/src/entity-store/hooks/use-transaction.ts @@ -1,5 +1,5 @@ import { entitiesTransaction } from 'pl-fe/entity-store/actions'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import type { EntityTypes } from 'pl-fe/entity-store/entities'; import type { EntitiesTransaction, Entity } from 'pl-fe/entity-store/types'; diff --git a/packages/pl-fe/src/entity-store/selectors.ts b/packages/pl-fe/src/entity-store/selectors.ts index 23320017bf..c6472f7f11 100644 --- a/packages/pl-fe/src/entity-store/selectors.ts +++ b/packages/pl-fe/src/entity-store/selectors.ts @@ -1,4 +1,4 @@ -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { EntitiesPath } from './hooks/types'; import type { Entity, EntityListState } from './types'; diff --git a/packages/pl-fe/src/features/about/index.tsx b/packages/pl-fe/src/features/about/index.tsx index 23f2052840..fe0e53e2c4 100644 --- a/packages/pl-fe/src/features/about/index.tsx +++ b/packages/pl-fe/src/features/about/index.tsx @@ -5,9 +5,9 @@ import { useParams } from 'react-router-dom'; import { fetchAboutPage } from 'pl-fe/actions/about'; import { Navlinks } from 'pl-fe/components/navlinks'; import Card from 'pl-fe/components/ui/card'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { languages } from '../preferences'; diff --git a/packages/pl-fe/src/features/account-gallery/components/media-item.tsx b/packages/pl-fe/src/features/account-gallery/components/media-item.tsx index 880a228386..7dc02911d9 100644 --- a/packages/pl-fe/src/features/account-gallery/components/media-item.tsx +++ b/packages/pl-fe/src/features/account-gallery/components/media-item.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'; import Blurhash from 'pl-fe/components/blurhash'; import Icon from 'pl-fe/components/icon'; import StillImage from 'pl-fe/components/still-image'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { isIOS } from 'pl-fe/is-mobile'; import type { AccountGalleryAttachment } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/account-gallery/index.tsx b/packages/pl-fe/src/features/account-gallery/index.tsx index 7503c47d6f..27cfccc649 100644 --- a/packages/pl-fe/src/features/account-gallery/index.tsx +++ b/packages/pl-fe/src/features/account-gallery/index.tsx @@ -4,13 +4,13 @@ import { FormattedMessage } from 'react-intl'; import { useParams } from 'react-router-dom'; import { fetchAccountTimeline } from 'pl-fe/actions/timelines'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import LoadMore from 'pl-fe/components/load-more'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import Column from 'pl-fe/components/ui/column'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { type AccountGalleryAttachment, getAccountGallery } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/account-timeline/index.tsx b/packages/pl-fe/src/features/account-timeline/index.tsx index fda8a6f528..276d46db56 100644 --- a/packages/pl-fe/src/features/account-timeline/index.tsx +++ b/packages/pl-fe/src/features/account-timeline/index.tsx @@ -4,16 +4,16 @@ import { useHistory } from 'react-router-dom'; import { fetchAccountByUsername } from 'pl-fe/actions/accounts'; import { fetchAccountTimeline } from 'pl-fe/actions/timelines'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import StatusList from 'pl-fe/components/status-list'; import Card, { CardBody } from 'pl-fe/components/ui/card'; import Spinner from 'pl-fe/components/ui/spinner'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { makeGetStatusIds } from 'pl-fe/selectors'; const getStatusIds = makeGetStatusIds(); diff --git a/packages/pl-fe/src/features/account/components/header.tsx b/packages/pl-fe/src/features/account/components/header.tsx index 8e54633af2..645c28ed02 100644 --- a/packages/pl-fe/src/features/account/components/header.tsx +++ b/packages/pl-fe/src/features/account/components/header.tsx @@ -11,7 +11,7 @@ import { blockDomain, unblockDomain } from 'pl-fe/actions/domain-blocks'; import { initMuteModal } from 'pl-fe/actions/mutes'; import { initReport, ReportableEntities } from 'pl-fe/actions/reports'; import { setSearchAccount } from 'pl-fe/actions/search'; -import { useFollow } from 'pl-fe/api/hooks/accounts/useFollow'; +import { useFollow } from 'pl-fe/api/hooks/accounts/use-follow'; import Badge from 'pl-fe/components/badge'; import DropdownMenu, { Menu } from 'pl-fe/components/dropdown-menu'; import StillImage from 'pl-fe/components/still-image'; @@ -22,10 +22,10 @@ import VerificationBadge from 'pl-fe/components/verification-badge'; import MovedNote from 'pl-fe/features/account-timeline/components/moved-note'; import ActionButton from 'pl-fe/features/ui/components/action-button'; import SubscriptionButton from 'pl-fe/features/ui/components/subscription-button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { useChats } from 'pl-fe/queries/chats'; import { queryClient } from 'pl-fe/queries/client'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/admin/announcements.tsx b/packages/pl-fe/src/features/admin/announcements.tsx index 1a3f3b28da..b72abe15e9 100644 --- a/packages/pl-fe/src/features/admin/announcements.tsx +++ b/packages/pl-fe/src/features/admin/announcements.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedDate, FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useAnnouncements } from 'pl-fe/api/hooks/admin/useAnnouncements'; +import { useAnnouncements } from 'pl-fe/api/hooks/admin/use-announcements'; import { ParsedContent } from 'pl-fe/components/parsed-content'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; diff --git a/packages/pl-fe/src/features/admin/components/admin-tabs.tsx b/packages/pl-fe/src/features/admin/components/admin-tabs.tsx index 8c85669cd5..d7e9eaba55 100644 --- a/packages/pl-fe/src/features/admin/components/admin-tabs.tsx +++ b/packages/pl-fe/src/features/admin/components/admin-tabs.tsx @@ -3,7 +3,7 @@ import { useIntl, defineMessages } from 'react-intl'; import { useRouteMatch } from 'react-router-dom'; import Tabs from 'pl-fe/components/ui/tabs'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ dashboard: { id: 'admin_nav.dashboard', defaultMessage: 'Dashboard' }, diff --git a/packages/pl-fe/src/features/admin/components/latest-accounts-panel.tsx b/packages/pl-fe/src/features/admin/components/latest-accounts-panel.tsx index d8cd9a673f..f9a5f928f5 100644 --- a/packages/pl-fe/src/features/admin/components/latest-accounts-panel.tsx +++ b/packages/pl-fe/src/features/admin/components/latest-accounts-panel.tsx @@ -6,8 +6,8 @@ import { useHistory } from 'react-router-dom'; import { fetchUsers } from 'pl-fe/actions/admin'; import Widget from 'pl-fe/components/ui/widget'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ title: { id: 'admin.latest_accounts_panel.title', defaultMessage: 'Latest Accounts' }, diff --git a/packages/pl-fe/src/features/admin/components/registration-mode-picker.tsx b/packages/pl-fe/src/features/admin/components/registration-mode-picker.tsx index 9a111d391a..416aaee104 100644 --- a/packages/pl-fe/src/features/admin/components/registration-mode-picker.tsx +++ b/packages/pl-fe/src/features/admin/components/registration-mode-picker.tsx @@ -4,8 +4,8 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import { updateConfig } from 'pl-fe/actions/admin'; import { RadioGroup, RadioItem } from 'pl-fe/components/radio'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import toast from 'pl-fe/toast'; type RegistrationMode = 'open' | 'approval' | 'closed'; diff --git a/packages/pl-fe/src/features/admin/components/report-status.tsx b/packages/pl-fe/src/features/admin/components/report-status.tsx index 3cb426314e..91eab19fd6 100644 --- a/packages/pl-fe/src/features/admin/components/report-status.tsx +++ b/packages/pl-fe/src/features/admin/components/report-status.tsx @@ -7,7 +7,7 @@ import StatusContent from 'pl-fe/components/status-content'; import StatusMedia from 'pl-fe/components/status-media'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import type { SelectedStatus } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/admin/components/report.tsx b/packages/pl-fe/src/features/admin/components/report.tsx index a5c51d7173..e0eb2e20d5 100644 --- a/packages/pl-fe/src/features/admin/components/report.tsx +++ b/packages/pl-fe/src/features/admin/components/report.tsx @@ -12,8 +12,8 @@ import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetReport } from 'pl-fe/selectors'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/admin/components/unapproved-account.tsx b/packages/pl-fe/src/features/admin/components/unapproved-account.tsx index c108b17944..1e5b227b5c 100644 --- a/packages/pl-fe/src/features/admin/components/unapproved-account.tsx +++ b/packages/pl-fe/src/features/admin/components/unapproved-account.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { approveUser, deleteUser } from 'pl-fe/actions/admin'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import { AuthorizeRejectButtons } from 'pl-fe/components/authorize-reject-buttons'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; interface IUnapprovedAccount { accountId: string; diff --git a/packages/pl-fe/src/features/admin/domains.tsx b/packages/pl-fe/src/features/admin/domains.tsx index 83de997357..adb517959c 100644 --- a/packages/pl-fe/src/features/admin/domains.tsx +++ b/packages/pl-fe/src/features/admin/domains.tsx @@ -1,7 +1,7 @@ import React, { useEffect } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useDomains } from 'pl-fe/api/hooks/admin/useDomains'; +import { useDomains } from 'pl-fe/api/hooks/admin/use-domains'; import { dateFormatOptions } from 'pl-fe/components/relative-timestamp'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; diff --git a/packages/pl-fe/src/features/admin/index.tsx b/packages/pl-fe/src/features/admin/index.tsx index f5601b7067..fc15f54e65 100644 --- a/packages/pl-fe/src/features/admin/index.tsx +++ b/packages/pl-fe/src/features/admin/index.tsx @@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl'; import { Switch, Route } from 'react-router-dom'; import Column from 'pl-fe/components/ui/column'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import AdminTabs from './components/admin-tabs'; import Waitlist from './tabs/awaiting-approval'; diff --git a/packages/pl-fe/src/features/admin/moderation-log.tsx b/packages/pl-fe/src/features/admin/moderation-log.tsx index e17496654c..fb0ce492b4 100644 --- a/packages/pl-fe/src/features/admin/moderation-log.tsx +++ b/packages/pl-fe/src/features/admin/moderation-log.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { defineMessages, FormattedDate, useIntl } from 'react-intl'; -import { useModerationLog } from 'pl-fe/api/hooks/admin/useModerationLog'; +import { useModerationLog } from 'pl-fe/api/hooks/admin/use-moderation-log'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; diff --git a/packages/pl-fe/src/features/admin/relays.tsx b/packages/pl-fe/src/features/admin/relays.tsx index 8f4b424bc5..821310d7a7 100644 --- a/packages/pl-fe/src/features/admin/relays.tsx +++ b/packages/pl-fe/src/features/admin/relays.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useRelays } from 'pl-fe/api/hooks/admin/useRelays'; +import { useRelays } from 'pl-fe/api/hooks/admin/use-relays'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; import Column from 'pl-fe/components/ui/column'; @@ -10,7 +10,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useTextField } from 'pl-fe/hooks/forms/useTextField'; +import { useTextField } from 'pl-fe/hooks/forms/use-text-field'; import toast from 'pl-fe/toast'; import type { AdminRelay as RelayEntity } from 'pl-api'; diff --git a/packages/pl-fe/src/features/admin/rules.tsx b/packages/pl-fe/src/features/admin/rules.tsx index ae0b3f3f82..60e525bbdc 100644 --- a/packages/pl-fe/src/features/admin/rules.tsx +++ b/packages/pl-fe/src/features/admin/rules.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useRules } from 'pl-fe/api/hooks/admin/useRules'; +import { useRules } from 'pl-fe/api/hooks/admin/use-rules'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; import Column from 'pl-fe/components/ui/column'; diff --git a/packages/pl-fe/src/features/admin/tabs/awaiting-approval.tsx b/packages/pl-fe/src/features/admin/tabs/awaiting-approval.tsx index c1d5f01cfc..0a17a57c4e 100644 --- a/packages/pl-fe/src/features/admin/tabs/awaiting-approval.tsx +++ b/packages/pl-fe/src/features/admin/tabs/awaiting-approval.tsx @@ -3,8 +3,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { fetchUsers } from 'pl-fe/actions/admin'; import ScrollableList from 'pl-fe/components/scrollable-list'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import UnapprovedAccount from '../components/unapproved-account'; diff --git a/packages/pl-fe/src/features/admin/tabs/dashboard.tsx b/packages/pl-fe/src/features/admin/tabs/dashboard.tsx index b8e3c8a53b..73b56cfcfc 100644 --- a/packages/pl-fe/src/features/admin/tabs/dashboard.tsx +++ b/packages/pl-fe/src/features/admin/tabs/dashboard.tsx @@ -5,9 +5,9 @@ import List, { ListItem } from 'pl-fe/components/list'; import { CardTitle } from 'pl-fe/components/ui/card'; import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import sourceCode from 'pl-fe/utils/code'; import { DashCounter, DashCounters } from '../components/dashcounter'; diff --git a/packages/pl-fe/src/features/admin/tabs/reports.tsx b/packages/pl-fe/src/features/admin/tabs/reports.tsx index d45e1d36a2..fc6cc08581 100644 --- a/packages/pl-fe/src/features/admin/tabs/reports.tsx +++ b/packages/pl-fe/src/features/admin/tabs/reports.tsx @@ -3,8 +3,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { fetchReports } from 'pl-fe/actions/admin'; import ScrollableList from 'pl-fe/components/scrollable-list'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import Report from '../components/report'; diff --git a/packages/pl-fe/src/features/admin/user-index.tsx b/packages/pl-fe/src/features/admin/user-index.tsx index 5b44a55749..93fe926e20 100644 --- a/packages/pl-fe/src/features/admin/user-index.tsx +++ b/packages/pl-fe/src/features/admin/user-index.tsx @@ -7,8 +7,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Input from 'pl-fe/components/ui/input'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ heading: { id: 'column.admin.users', defaultMessage: 'Users' }, diff --git a/packages/pl-fe/src/features/aliases/components/account.tsx b/packages/pl-fe/src/features/aliases/components/account.tsx index b21834eff2..0159aad829 100644 --- a/packages/pl-fe/src/features/aliases/components/account.tsx +++ b/packages/pl-fe/src/features/aliases/components/account.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { addToAliases } from 'pl-fe/actions/aliases'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import AccountComponent from 'pl-fe/components/account'; import IconButton from 'pl-fe/components/icon-button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; const messages = defineMessages({ add: { id: 'aliases.account.add', defaultMessage: 'Create alias' }, diff --git a/packages/pl-fe/src/features/aliases/components/search.tsx b/packages/pl-fe/src/features/aliases/components/search.tsx index 48e5e04dfa..f17f8ffff4 100644 --- a/packages/pl-fe/src/features/aliases/components/search.tsx +++ b/packages/pl-fe/src/features/aliases/components/search.tsx @@ -5,8 +5,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { fetchAliasesSuggestions, clearAliasesSuggestions, changeAliasesSuggestions } from 'pl-fe/actions/aliases'; import Icon from 'pl-fe/components/icon'; import Button from 'pl-fe/components/ui/button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ search: { id: 'aliases.search', defaultMessage: 'Search your old account' }, diff --git a/packages/pl-fe/src/features/aliases/index.tsx b/packages/pl-fe/src/features/aliases/index.tsx index e54f15f1ab..d786abfc68 100644 --- a/packages/pl-fe/src/features/aliases/index.tsx +++ b/packages/pl-fe/src/features/aliases/index.tsx @@ -8,10 +8,10 @@ import { CardHeader, CardTitle } from 'pl-fe/components/ui/card'; import Column from 'pl-fe/components/ui/column'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import Account from './components/account'; import Search from './components/search'; diff --git a/packages/pl-fe/src/features/auth-login/components/captcha.tsx b/packages/pl-fe/src/features/auth-login/components/captcha.tsx index 8da0e3e0ff..add7cb36aa 100644 --- a/packages/pl-fe/src/features/auth-login/components/captcha.tsx +++ b/packages/pl-fe/src/features/auth-login/components/captcha.tsx @@ -6,7 +6,7 @@ import { fetchCaptcha } from 'pl-fe/actions/auth'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; const noOp = () => {}; diff --git a/packages/pl-fe/src/features/auth-login/components/consumer-button.tsx b/packages/pl-fe/src/features/auth-login/components/consumer-button.tsx index 0b8c1d238f..cad71f2eef 100644 --- a/packages/pl-fe/src/features/auth-login/components/consumer-button.tsx +++ b/packages/pl-fe/src/features/auth-login/components/consumer-button.tsx @@ -4,7 +4,7 @@ import { useIntl, defineMessages } from 'react-intl'; import { prepareRequest } from 'pl-fe/actions/consumer-auth'; import IconButton from 'pl-fe/components/ui/icon-button'; import Tooltip from 'pl-fe/components/ui/tooltip'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { capitalize } from 'pl-fe/utils/strings'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/auth-login/components/consumers-list.tsx b/packages/pl-fe/src/features/auth-login/components/consumers-list.tsx index 76b143a8c4..cacdf1afe8 100644 --- a/packages/pl-fe/src/features/auth-login/components/consumers-list.tsx +++ b/packages/pl-fe/src/features/auth-login/components/consumers-list.tsx @@ -5,7 +5,7 @@ import Card from 'pl-fe/components/ui/card'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import ConsumerButton from './consumer-button'; diff --git a/packages/pl-fe/src/features/auth-login/components/login-form.tsx b/packages/pl-fe/src/features/auth-login/components/login-form.tsx index 50157f3a3c..2752369cfa 100644 --- a/packages/pl-fe/src/features/auth-login/components/login-form.tsx +++ b/packages/pl-fe/src/features/auth-login/components/login-form.tsx @@ -7,7 +7,7 @@ import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; const messages = defineMessages({ username: { diff --git a/packages/pl-fe/src/features/auth-login/components/login-page.tsx b/packages/pl-fe/src/features/auth-login/components/login-page.tsx index 082b6932e0..f13f4cde3b 100644 --- a/packages/pl-fe/src/features/auth-login/components/login-page.tsx +++ b/packages/pl-fe/src/features/auth-login/components/login-page.tsx @@ -8,8 +8,8 @@ import { BigCard } from 'pl-fe/components/big-card'; import Button from 'pl-fe/components/ui/button'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import { getRedirectUrl } from 'pl-fe/utils/redirect'; import { isStandalone } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/features/auth-login/components/otp-auth-form.tsx b/packages/pl-fe/src/features/auth-login/components/otp-auth-form.tsx index 937a60081e..d45214633d 100644 --- a/packages/pl-fe/src/features/auth-login/components/otp-auth-form.tsx +++ b/packages/pl-fe/src/features/auth-login/components/otp-auth-form.tsx @@ -10,7 +10,7 @@ import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; const messages = defineMessages({ otpCodeHint: { id: 'login.fields.otp_code_hint', defaultMessage: 'Enter the two-factor code generated by your phone app or use one of your recovery codes' }, diff --git a/packages/pl-fe/src/features/auth-login/components/password-reset.tsx b/packages/pl-fe/src/features/auth-login/components/password-reset.tsx index 3545b8a98f..eed621bad3 100644 --- a/packages/pl-fe/src/features/auth-login/components/password-reset.tsx +++ b/packages/pl-fe/src/features/auth-login/components/password-reset.tsx @@ -9,8 +9,8 @@ import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/auth-login/components/registration-form.tsx b/packages/pl-fe/src/features/auth-login/components/registration-form.tsx index dc8af890d7..fb957adaa6 100644 --- a/packages/pl-fe/src/features/auth-login/components/registration-form.tsx +++ b/packages/pl-fe/src/features/auth-login/components/registration-form.tsx @@ -16,10 +16,10 @@ import Input from 'pl-fe/components/ui/input'; import Select from 'pl-fe/components/ui/select'; import Textarea from 'pl-fe/components/ui/textarea'; import CaptchaField from 'pl-fe/features/auth-login/components/captcha'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { CreateAccountParams } from 'pl-api'; diff --git a/packages/pl-fe/src/features/auth-login/components/registration-page.tsx b/packages/pl-fe/src/features/auth-login/components/registration-page.tsx index 8e21596b5b..cce5bf427b 100644 --- a/packages/pl-fe/src/features/auth-login/components/registration-page.tsx +++ b/packages/pl-fe/src/features/auth-login/components/registration-page.tsx @@ -3,8 +3,8 @@ import { FormattedMessage } from 'react-intl'; import { BigCard } from 'pl-fe/components/big-card'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useRegistrationStatus } from 'pl-fe/hooks/use-registration-status'; import RegistrationForm from './registration-form'; diff --git a/packages/pl-fe/src/features/auth-token-list/index.tsx b/packages/pl-fe/src/features/auth-token-list/index.tsx index 741f25e713..f922966815 100644 --- a/packages/pl-fe/src/features/auth-token-list/index.tsx +++ b/packages/pl-fe/src/features/auth-token-list/index.tsx @@ -9,8 +9,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { OauthToken } from 'pl-api'; diff --git a/packages/pl-fe/src/features/backups/index.tsx b/packages/pl-fe/src/features/backups/index.tsx index b24f90ea6e..952ffe0b1b 100644 --- a/packages/pl-fe/src/features/backups/index.tsx +++ b/packages/pl-fe/src/features/backups/index.tsx @@ -10,8 +10,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { Backup as BackupEntity } from 'pl-api'; diff --git a/packages/pl-fe/src/features/birthdays/account.tsx b/packages/pl-fe/src/features/birthdays/account.tsx index d45460b085..3c32d7eff5 100644 --- a/packages/pl-fe/src/features/birthdays/account.tsx +++ b/packages/pl-fe/src/features/birthdays/account.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import AccountComponent from 'pl-fe/components/account'; import Icon from 'pl-fe/components/icon'; import HStack from 'pl-fe/components/ui/hstack'; diff --git a/packages/pl-fe/src/features/blocks/index.tsx b/packages/pl-fe/src/features/blocks/index.tsx index 30488edcf9..aefb762a6b 100644 --- a/packages/pl-fe/src/features/blocks/index.tsx +++ b/packages/pl-fe/src/features/blocks/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useBlocks } from 'pl-fe/api/hooks/accounts/useAccountList'; +import { useBlocks } from 'pl-fe/api/hooks/accounts/use-account-list'; import Account from 'pl-fe/components/account'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; diff --git a/packages/pl-fe/src/features/bookmark-folders/components/new-folder-form.tsx b/packages/pl-fe/src/features/bookmark-folders/components/new-folder-form.tsx index bcf840bbc3..0a8c93a025 100644 --- a/packages/pl-fe/src/features/bookmark-folders/components/new-folder-form.tsx +++ b/packages/pl-fe/src/features/bookmark-folders/components/new-folder-form.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useCreateBookmarkFolder } from 'pl-fe/api/hooks/statuses/useCreateBookmarkFolder'; +import { useCreateBookmarkFolder } from 'pl-fe/api/hooks/statuses/use-create-bookmark-folder'; import Button from 'pl-fe/components/ui/button'; import Form from 'pl-fe/components/ui/form'; import HStack from 'pl-fe/components/ui/hstack'; import Input from 'pl-fe/components/ui/input'; -import { useTextField } from 'pl-fe/hooks/forms/useTextField'; +import { useTextField } from 'pl-fe/hooks/forms/use-text-field'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/bookmark-folders/index.tsx b/packages/pl-fe/src/features/bookmark-folders/index.tsx index 8c6f389a07..184ecd86a5 100644 --- a/packages/pl-fe/src/features/bookmark-folders/index.tsx +++ b/packages/pl-fe/src/features/bookmark-folders/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { Redirect } from 'react-router-dom'; -import { useBookmarkFolders } from 'pl-fe/api/hooks/statuses/useBookmarkFolders'; +import { useBookmarkFolders } from 'pl-fe/api/hooks/statuses/use-bookmark-folders'; import List, { ListItem } from 'pl-fe/components/list'; import Column from 'pl-fe/components/ui/column'; import Emoji from 'pl-fe/components/ui/emoji'; @@ -10,7 +10,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import NewFolderForm from './components/new-folder-form'; diff --git a/packages/pl-fe/src/features/bookmarks/index.tsx b/packages/pl-fe/src/features/bookmarks/index.tsx index 5bff4b4871..2149318329 100644 --- a/packages/pl-fe/src/features/bookmarks/index.tsx +++ b/packages/pl-fe/src/features/bookmarks/index.tsx @@ -5,16 +5,16 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { useHistory } from 'react-router-dom'; import { fetchBookmarkedStatuses, expandBookmarkedStatuses } from 'pl-fe/actions/bookmarks'; -import { useBookmarkFolder } from 'pl-fe/api/hooks/statuses/useBookmarkFolder'; -import { useDeleteBookmarkFolder } from 'pl-fe/api/hooks/statuses/useDeleteBookmarkFolder'; +import { useBookmarkFolder } from 'pl-fe/api/hooks/statuses/use-bookmark-folder'; +import { useDeleteBookmarkFolder } from 'pl-fe/api/hooks/statuses/use-delete-bookmark-folder'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import StatusList from 'pl-fe/components/status-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import { useModalsStore } from 'pl-fe/stores/modals'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/bubble-timeline/index.tsx b/packages/pl-fe/src/features/bubble-timeline/index.tsx index f9dbd0e864..74b63b168b 100644 --- a/packages/pl-fe/src/features/bubble-timeline/index.tsx +++ b/packages/pl-fe/src/features/bubble-timeline/index.tsx @@ -4,10 +4,10 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchBubbleTimeline } from 'pl-fe/actions/timelines'; import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/chats/components/chat-composer.tsx b/packages/pl-fe/src/features/chats/components/chat-composer.tsx index bde675b453..ed0c7b39c5 100644 --- a/packages/pl-fe/src/features/chats/components/chat-composer.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-composer.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { defineMessages, IntlShape, useIntl } from 'react-intl'; import { unblockAccount } from 'pl-fe/actions/accounts'; -import { useRelationship } from 'pl-fe/api/hooks/accounts/useRelationship'; +import { useRelationship } from 'pl-fe/api/hooks/accounts/use-relationship'; import Button from 'pl-fe/components/ui/button'; import Combobox, { ComboboxInput, ComboboxList, ComboboxOption, ComboboxPopover } from 'pl-fe/components/ui/combobox'; import HStack from 'pl-fe/components/ui/hstack'; @@ -12,8 +12,8 @@ import Text from 'pl-fe/components/ui/text'; import { useChatContext } from 'pl-fe/contexts/chat-context'; import UploadButton from 'pl-fe/features/compose/components/upload-button'; import emojiSearch from 'pl-fe/features/emoji/search'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { useModalsStore } from 'pl-fe/stores/modals'; import { textAtCursorMatchesToken } from 'pl-fe/utils/suggestions'; diff --git a/packages/pl-fe/src/features/chats/components/chat-list-item.tsx b/packages/pl-fe/src/features/chats/components/chat-list-item.tsx index 897ff0e6f3..beebcd28a1 100644 --- a/packages/pl-fe/src/features/chats/components/chat-list-item.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-list-item.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useHistory } from 'react-router-dom'; -import { useRelationship } from 'pl-fe/api/hooks/accounts/useRelationship'; +import { useRelationship } from 'pl-fe/api/hooks/accounts/use-relationship'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import { ParsedContent } from 'pl-fe/components/parsed-content'; import RelativeTimestamp from 'pl-fe/components/relative-timestamp'; @@ -13,7 +13,7 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import { useChatContext } from 'pl-fe/contexts/chat-context'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useChatActions } from 'pl-fe/queries/chats'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/chats/components/chat-message-list.tsx b/packages/pl-fe/src/features/chats/components/chat-message-list.tsx index 9cfe00ba54..095292c533 100644 --- a/packages/pl-fe/src/features/chats/components/chat-message-list.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-message-list.tsx @@ -9,7 +9,7 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import { Entities } from 'pl-fe/entity-store/entities'; import PlaceholderChatMessage from 'pl-fe/features/placeholder/components/placeholder-chat-message'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useChatActions, useChatMessages } from 'pl-fe/queries/chats'; import ChatMessage from './chat-message'; diff --git a/packages/pl-fe/src/features/chats/components/chat-message.tsx b/packages/pl-fe/src/features/chats/components/chat-message.tsx index c973a80aa8..90637674e0 100644 --- a/packages/pl-fe/src/features/chats/components/chat-message.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-message.tsx @@ -11,7 +11,7 @@ import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import { MediaGallery } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { ChatKeys, useChatActions } from 'pl-fe/queries/chats'; import { queryClient } from 'pl-fe/queries/client'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx index 68c45627f0..a02691f696 100644 --- a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-main.tsx @@ -12,9 +12,9 @@ import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import { useChatContext } from 'pl-fe/contexts/chat-context'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useChat, useChatActions, useChats } from 'pl-fe/queries/chats'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-settings.tsx b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-settings.tsx index e043277398..8a77c5abed 100644 --- a/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-settings.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-page/components/chat-page-settings.tsx @@ -12,9 +12,9 @@ import IconButton from 'pl-fe/components/ui/icon-button'; import Stack from 'pl-fe/components/ui/stack'; import Toggle from 'pl-fe/components/ui/toggle'; import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useUpdateCredentials } from 'pl-fe/queries/accounts'; type FormData = { diff --git a/packages/pl-fe/src/features/chats/components/chat-search/chat-search.tsx b/packages/pl-fe/src/features/chats/components/chat-search/chat-search.tsx index 4faa53eef3..b8b003b8f5 100644 --- a/packages/pl-fe/src/features/chats/components/chat-search/chat-search.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-search/chat-search.tsx @@ -7,7 +7,7 @@ import Icon from 'pl-fe/components/ui/icon'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import { ChatWidgetScreens, useChatContext } from 'pl-fe/contexts/chat-context'; -import { useDebounce } from 'pl-fe/hooks/useDebounce'; +import { useDebounce } from 'pl-fe/hooks/use-debounce'; import { useChats } from 'pl-fe/queries/chats'; import { queryClient } from 'pl-fe/queries/client'; import useAccountSearch from 'pl-fe/queries/search'; diff --git a/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx b/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx index d7d05e1749..6404596b4c 100644 --- a/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx @@ -3,7 +3,7 @@ import React, { HTMLAttributes } from 'react'; import HStack from 'pl-fe/components/ui/hstack'; import IconButton from 'pl-fe/components/ui/icon-button'; import Text from 'pl-fe/components/ui/text'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IChatPaneHeader { isOpen: boolean; diff --git a/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx b/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx index 1124fab422..78ed96db81 100644 --- a/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-widget/chat-settings.tsx @@ -9,9 +9,9 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import { ChatWidgetScreens, useChatContext } from 'pl-fe/contexts/chat-context'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useChatActions } from 'pl-fe/queries/chats'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/chats/components/chat.tsx b/packages/pl-fe/src/features/chats/components/chat.tsx index 838f2b1549..57e49e522a 100644 --- a/packages/pl-fe/src/features/chats/components/chat.tsx +++ b/packages/pl-fe/src/features/chats/components/chat.tsx @@ -4,7 +4,7 @@ import { defineMessages, useIntl } from 'react-intl'; import { uploadMedia } from 'pl-fe/actions/media'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useChatActions } from 'pl-fe/queries/chats'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/circle/index.tsx b/packages/pl-fe/src/features/circle/index.tsx index b33e2955d3..18365a0a87 100644 --- a/packages/pl-fe/src/features/circle/index.tsx +++ b/packages/pl-fe/src/features/circle/index.tsx @@ -15,8 +15,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import ProgressBar from 'pl-fe/components/ui/progress-bar'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { useModalsStore } from 'pl-fe/stores/modals'; const toRad = (x: number) => x * (Math.PI / 180); diff --git a/packages/pl-fe/src/features/community-timeline/index.tsx b/packages/pl-fe/src/features/community-timeline/index.tsx index 3a63f6ff33..e6f0bdceb4 100644 --- a/packages/pl-fe/src/features/community-timeline/index.tsx +++ b/packages/pl-fe/src/features/community-timeline/index.tsx @@ -2,13 +2,13 @@ import React, { useEffect } from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchPublicTimeline } from 'pl-fe/actions/timelines'; -import { useCommunityStream } from 'pl-fe/api/hooks/streaming/useCommunityStream'; +import { useCommunityStream } from 'pl-fe/api/hooks/streaming/use-community-stream'; import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/compose/components/autosuggest-account.tsx b/packages/pl-fe/src/features/compose/components/autosuggest-account.tsx index baebc9ee0b..f0bf17beaf 100644 --- a/packages/pl-fe/src/features/compose/components/autosuggest-account.tsx +++ b/packages/pl-fe/src/features/compose/components/autosuggest-account.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Account from 'pl-fe/components/account'; interface IAutosuggestAccount { diff --git a/packages/pl-fe/src/features/compose/components/compose-form.tsx b/packages/pl-fe/src/features/compose/components/compose-form.tsx index 47ef8b8472..d2b9bf2e87 100644 --- a/packages/pl-fe/src/features/compose/components/compose-form.tsx +++ b/packages/pl-fe/src/features/compose/components/compose-form.tsx @@ -17,12 +17,12 @@ import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; import { ComposeEditor } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import QuotedStatusContainer from '../containers/quoted-status-container'; import ReplyIndicatorContainer from '../containers/reply-indicator-container'; diff --git a/packages/pl-fe/src/features/compose/components/content-type-button.tsx b/packages/pl-fe/src/features/compose/components/content-type-button.tsx index bcd40c61ab..6bc56fd811 100644 --- a/packages/pl-fe/src/features/compose/components/content-type-button.tsx +++ b/packages/pl-fe/src/features/compose/components/content-type-button.tsx @@ -4,9 +4,9 @@ import { defineMessages, useIntl } from 'react-intl'; import { changeComposeContentType } from 'pl-fe/actions/compose'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import Button from 'pl-fe/components/ui/button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useInstance } from 'pl-fe/hooks/use-instance'; const messages = defineMessages({ content_type_plaintext: { id: 'preferences.options.content_type_plaintext', defaultMessage: 'Plain text' }, diff --git a/packages/pl-fe/src/features/compose/components/language-dropdown.tsx b/packages/pl-fe/src/features/compose/components/language-dropdown.tsx index 5a90a916e1..0d4437fba4 100644 --- a/packages/pl-fe/src/features/compose/components/language-dropdown.tsx +++ b/packages/pl-fe/src/features/compose/components/language-dropdown.tsx @@ -9,10 +9,10 @@ import Button from 'pl-fe/components/ui/button'; import Icon from 'pl-fe/components/ui/icon'; import Input from 'pl-fe/components/ui/input'; import { type Language, languages as languagesObject } from 'pl-fe/features/preferences'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useSettings } from 'pl-fe/hooks/use-settings'; const getFrequentlyUsedLanguages = (languageCounters: Record) => ( Object.keys(languageCounters) diff --git a/packages/pl-fe/src/features/compose/components/poll-button.tsx b/packages/pl-fe/src/features/compose/components/poll-button.tsx index f0799534b2..073a58465d 100644 --- a/packages/pl-fe/src/features/compose/components/poll-button.tsx +++ b/packages/pl-fe/src/features/compose/components/poll-button.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { addPoll, removePoll } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import ComposeFormButton from './compose-form-button'; diff --git a/packages/pl-fe/src/features/compose/components/polls/poll-form.tsx b/packages/pl-fe/src/features/compose/components/polls/poll-form.tsx index cee17617b5..31e6df6bad 100644 --- a/packages/pl-fe/src/features/compose/components/polls/poll-form.tsx +++ b/packages/pl-fe/src/features/compose/components/polls/poll-form.tsx @@ -9,9 +9,9 @@ import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import DurationSelector from './duration-selector'; diff --git a/packages/pl-fe/src/features/compose/components/privacy-dropdown.tsx b/packages/pl-fe/src/features/compose/components/privacy-dropdown.tsx index 9c2b89c265..7504de03dd 100644 --- a/packages/pl-fe/src/features/compose/components/privacy-dropdown.tsx +++ b/packages/pl-fe/src/features/compose/components/privacy-dropdown.tsx @@ -6,10 +6,10 @@ import { fetchLists } from 'pl-fe/actions/lists'; import DropdownMenu, { MenuItem } from 'pl-fe/components/dropdown-menu'; import Button from 'pl-fe/components/ui/button'; import { getOrderedLists } from 'pl-fe/features/lists'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { Features } from 'pl-api'; diff --git a/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx b/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx index d67bae5b8b..80cf18832b 100644 --- a/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx +++ b/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx @@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl'; import Link from 'pl-fe/components/link'; import Text from 'pl-fe/components/ui/text'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; interface IReplyGroupIndicator { diff --git a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx index a2be8170a4..c6809ef074 100644 --- a/packages/pl-fe/src/features/compose/components/reply-mentions.tsx +++ b/packages/pl-fe/src/features/compose/components/reply-mentions.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { FormattedList, FormattedMessage } from 'react-intl'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useModalsStore } from 'pl-fe/stores/modals'; interface IReplyMentions { diff --git a/packages/pl-fe/src/features/compose/components/schedule-button.tsx b/packages/pl-fe/src/features/compose/components/schedule-button.tsx index 7dba46f810..7a090edbfc 100644 --- a/packages/pl-fe/src/features/compose/components/schedule-button.tsx +++ b/packages/pl-fe/src/features/compose/components/schedule-button.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { addSchedule, removeSchedule } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import ComposeFormButton from './compose-form-button'; diff --git a/packages/pl-fe/src/features/compose/components/schedule-form.tsx b/packages/pl-fe/src/features/compose/components/schedule-form.tsx index 55f8ca57ec..f34e4329c4 100644 --- a/packages/pl-fe/src/features/compose/components/schedule-form.tsx +++ b/packages/pl-fe/src/features/compose/components/schedule-form.tsx @@ -9,8 +9,8 @@ import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import { DatePicker } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; const isCurrentOrFutureDate = (date: Date) => date && new Date().setHours(0, 0, 0, 0) <= new Date(date).setHours(0, 0, 0, 0); diff --git a/packages/pl-fe/src/features/compose/components/sensitive-media-button.tsx b/packages/pl-fe/src/features/compose/components/sensitive-media-button.tsx index 2b07be263c..4a1571dfb3 100644 --- a/packages/pl-fe/src/features/compose/components/sensitive-media-button.tsx +++ b/packages/pl-fe/src/features/compose/components/sensitive-media-button.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { changeComposeSpoilerness } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import ComposeFormButton from './compose-form-button'; diff --git a/packages/pl-fe/src/features/compose/components/spoiler-input.tsx b/packages/pl-fe/src/features/compose/components/spoiler-input.tsx index 4c1abb21d7..2fee606765 100644 --- a/packages/pl-fe/src/features/compose/components/spoiler-input.tsx +++ b/packages/pl-fe/src/features/compose/components/spoiler-input.tsx @@ -3,8 +3,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { changeComposeSpoilerText } from 'pl-fe/actions/compose'; import AutosuggestInput, { IAutosuggestInput } from 'pl-fe/components/autosuggest-input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; const messages = defineMessages({ placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Subject (optional)' }, diff --git a/packages/pl-fe/src/features/compose/components/upload-button.tsx b/packages/pl-fe/src/features/compose/components/upload-button.tsx index f757cfed25..1d6d35245a 100644 --- a/packages/pl-fe/src/features/compose/components/upload-button.tsx +++ b/packages/pl-fe/src/features/compose/components/upload-button.tsx @@ -2,7 +2,7 @@ import React, { useRef } from 'react'; import { defineMessages, IntlShape, useIntl } from 'react-intl'; import IconButton from 'pl-fe/components/ui/icon-button'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; const messages = defineMessages({ upload: { id: 'upload_button.label', defaultMessage: 'Add media attachment' }, diff --git a/packages/pl-fe/src/features/compose/components/upload-form.tsx b/packages/pl-fe/src/features/compose/components/upload-form.tsx index 4079ffccac..81c2fe8c4e 100644 --- a/packages/pl-fe/src/features/compose/components/upload-form.tsx +++ b/packages/pl-fe/src/features/compose/components/upload-form.tsx @@ -3,8 +3,8 @@ import React, { useCallback, useRef } from 'react'; import { changeMediaOrder } from 'pl-fe/actions/compose'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import Upload from './upload'; import UploadProgress from './upload-progress'; diff --git a/packages/pl-fe/src/features/compose/components/upload-progress.tsx b/packages/pl-fe/src/features/compose/components/upload-progress.tsx index a39c96f2a2..39e2d5337b 100644 --- a/packages/pl-fe/src/features/compose/components/upload-progress.tsx +++ b/packages/pl-fe/src/features/compose/components/upload-progress.tsx @@ -1,7 +1,7 @@ import React from 'react'; import UploadProgress from 'pl-fe/components/upload-progress'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useCompose } from 'pl-fe/hooks/use-compose'; interface IComposeUploadProgress { composeId: string; diff --git a/packages/pl-fe/src/features/compose/components/upload.tsx b/packages/pl-fe/src/features/compose/components/upload.tsx index f00afb2b87..4726c4a942 100644 --- a/packages/pl-fe/src/features/compose/components/upload.tsx +++ b/packages/pl-fe/src/features/compose/components/upload.tsx @@ -2,9 +2,9 @@ import React, { useCallback } from 'react'; import { undoUploadCompose, changeUploadCompose } from 'pl-fe/actions/compose'; import Upload from 'pl-fe/components/upload'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useInstance } from 'pl-fe/hooks/use-instance'; interface IUploadCompose { id: string; diff --git a/packages/pl-fe/src/features/compose/containers/quoted-status-container.tsx b/packages/pl-fe/src/features/compose/containers/quoted-status-container.tsx index d3a245ba0d..79c6dfe4aa 100644 --- a/packages/pl-fe/src/features/compose/containers/quoted-status-container.tsx +++ b/packages/pl-fe/src/features/compose/containers/quoted-status-container.tsx @@ -2,8 +2,8 @@ import React, { useCallback } from 'react'; import { cancelQuoteCompose } from 'pl-fe/actions/compose'; import QuotedStatus from 'pl-fe/components/quoted-status'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; interface IQuotedStatusContainer { diff --git a/packages/pl-fe/src/features/compose/containers/reply-indicator-container.tsx b/packages/pl-fe/src/features/compose/containers/reply-indicator-container.tsx index 3dfca8165c..cd3500f1b0 100644 --- a/packages/pl-fe/src/features/compose/containers/reply-indicator-container.tsx +++ b/packages/pl-fe/src/features/compose/containers/reply-indicator-container.tsx @@ -1,9 +1,9 @@ import React, { useCallback } from 'react'; import { cancelReplyCompose } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import { makeGetStatus } from 'pl-fe/selectors'; import ReplyIndicator from '../components/reply-indicator'; diff --git a/packages/pl-fe/src/features/compose/containers/upload-button-container.tsx b/packages/pl-fe/src/features/compose/containers/upload-button-container.tsx index 36b7c7eae7..93b4e8261f 100644 --- a/packages/pl-fe/src/features/compose/containers/upload-button-container.tsx +++ b/packages/pl-fe/src/features/compose/containers/upload-button-container.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { uploadCompose } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import UploadButton from '../components/upload-button'; diff --git a/packages/pl-fe/src/features/compose/containers/warning-container.tsx b/packages/pl-fe/src/features/compose/containers/warning-container.tsx index af377b3d30..67fbbec3a7 100644 --- a/packages/pl-fe/src/features/compose/containers/warning-container.tsx +++ b/packages/pl-fe/src/features/compose/containers/warning-container.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import { selectOwnAccount } from 'pl-fe/selectors'; import Warning from '../components/warning'; diff --git a/packages/pl-fe/src/features/compose/editor/index.tsx b/packages/pl-fe/src/features/compose/editor/index.tsx index 6adbbda584..800872f9ff 100644 --- a/packages/pl-fe/src/features/compose/editor/index.tsx +++ b/packages/pl-fe/src/features/compose/editor/index.tsx @@ -21,8 +21,8 @@ import { $createParagraphNode, $createTextNode, $getRoot, type EditorState, type import React, { useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import { importImage } from './handlers/image'; import { useNodes } from './nodes'; diff --git a/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx b/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx index bad7dabfdc..43a37ff312 100644 --- a/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx +++ b/packages/pl-fe/src/features/compose/editor/nodes/image-component.tsx @@ -31,7 +31,7 @@ import * as v from 'valibot'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import IconButton from 'pl-fe/components/ui/icon-button'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useModalsStore } from 'pl-fe/stores/modals'; import { $isImageNode } from './image-node'; diff --git a/packages/pl-fe/src/features/compose/editor/nodes/index.ts b/packages/pl-fe/src/features/compose/editor/nodes/index.ts index 960102cfd1..1daec172ca 100644 --- a/packages/pl-fe/src/features/compose/editor/nodes/index.ts +++ b/packages/pl-fe/src/features/compose/editor/nodes/index.ts @@ -11,7 +11,7 @@ import { ListItemNode, ListNode } from '@lexical/list'; import { HorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode'; import { HeadingNode, QuoteNode } from '@lexical/rich-text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { EmojiNode } from './emoji-node'; import { ImageNode } from './image-node'; diff --git a/packages/pl-fe/src/features/compose/editor/plugins/autosuggest-plugin.tsx b/packages/pl-fe/src/features/compose/editor/plugins/autosuggest-plugin.tsx index c63959d0a8..3e8f290288 100644 --- a/packages/pl-fe/src/features/compose/editor/plugins/autosuggest-plugin.tsx +++ b/packages/pl-fe/src/features/compose/editor/plugins/autosuggest-plugin.tsx @@ -35,8 +35,8 @@ import ReactDOM from 'react-dom'; import { clearComposeSuggestions, fetchComposeSuggestions } from 'pl-fe/actions/compose'; import { chooseEmoji } from 'pl-fe/actions/emojis'; import AutosuggestEmoji from 'pl-fe/components/autosuggest-emoji'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; import { selectAccount } from 'pl-fe/selectors'; import { textAtCursorMatchesToken } from 'pl-fe/utils/suggestions'; diff --git a/packages/pl-fe/src/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx b/packages/pl-fe/src/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx index a54ae6f506..d9d259538e 100644 --- a/packages/pl-fe/src/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx +++ b/packages/pl-fe/src/features/compose/editor/plugins/floating-block-type-toolbar-plugin.tsx @@ -23,8 +23,8 @@ import { createPortal } from 'react-dom'; import { defineMessages, useIntl } from 'react-intl'; import { uploadFile } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { $createImageNode } from '../nodes/image-node'; import { setFloatingElemPosition } from '../utils/set-floating-elem-position'; diff --git a/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx b/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx index 2970438567..f1f955d370 100644 --- a/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx +++ b/packages/pl-fe/src/features/compose/editor/plugins/floating-text-format-toolbar-plugin.tsx @@ -40,7 +40,7 @@ import { createPortal } from 'react-dom'; import { defineMessages, useIntl } from 'react-intl'; import Icon from 'pl-fe/components/ui/icon'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { getDOMRangeRect } from '../utils/get-dom-range-rect'; import { getSelectedNode } from '../utils/get-selected-node'; diff --git a/packages/pl-fe/src/features/compose/editor/plugins/state-plugin.tsx b/packages/pl-fe/src/features/compose/editor/plugins/state-plugin.tsx index 170249e964..c5df42cdbb 100644 --- a/packages/pl-fe/src/features/compose/editor/plugins/state-plugin.tsx +++ b/packages/pl-fe/src/features/compose/editor/plugins/state-plugin.tsx @@ -7,8 +7,8 @@ import { useIntl } from 'react-intl'; import { addSuggestedLanguage, addSuggestedQuote, setEditorState } from 'pl-fe/actions/compose'; import { fetchStatus } from 'pl-fe/actions/statuses'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { getStatusIdsFromLinksInContent } from 'pl-fe/utils/status'; import type { LanguageIdentificationModel } from 'fasttext.wasm.js/dist/models/language-identification/common.js'; diff --git a/packages/pl-fe/src/features/conversations/components/conversation.tsx b/packages/pl-fe/src/features/conversations/components/conversation.tsx index 41630534d2..54d572d874 100644 --- a/packages/pl-fe/src/features/conversations/components/conversation.tsx +++ b/packages/pl-fe/src/features/conversations/components/conversation.tsx @@ -3,8 +3,8 @@ import { useHistory } from 'react-router-dom'; import { markConversationRead } from 'pl-fe/actions/conversations'; import StatusContainer from 'pl-fe/containers/status-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { selectAccount } from 'pl-fe/selectors'; interface IConversation { diff --git a/packages/pl-fe/src/features/conversations/components/conversations-list.tsx b/packages/pl-fe/src/features/conversations/components/conversations-list.tsx index 5e82b16503..a163fa40e0 100644 --- a/packages/pl-fe/src/features/conversations/components/conversations-list.tsx +++ b/packages/pl-fe/src/features/conversations/components/conversations-list.tsx @@ -4,8 +4,8 @@ import { FormattedMessage } from 'react-intl'; import { expandConversations } from 'pl-fe/actions/conversations'; import ScrollableList from 'pl-fe/components/scrollable-list'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import Conversation from './conversation'; diff --git a/packages/pl-fe/src/features/conversations/index.tsx b/packages/pl-fe/src/features/conversations/index.tsx index a2696c1d9f..72a4c805ef 100644 --- a/packages/pl-fe/src/features/conversations/index.tsx +++ b/packages/pl-fe/src/features/conversations/index.tsx @@ -3,10 +3,10 @@ import { defineMessages, useIntl } from 'react-intl'; import { directComposeById } from 'pl-fe/actions/compose'; import { mountConversations, unmountConversations, expandConversations } from 'pl-fe/actions/conversations'; -import { useDirectStream } from 'pl-fe/api/hooks/streaming/useDirectStream'; +import { useDirectStream } from 'pl-fe/api/hooks/streaming/use-direct-stream'; import AccountSearch from 'pl-fe/components/account-search'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import ConversationsList from './components/conversations-list'; diff --git a/packages/pl-fe/src/features/crypto-donate/components/crypto-donate-panel.tsx b/packages/pl-fe/src/features/crypto-donate/components/crypto-donate-panel.tsx index 4ea44ae420..3ecab89ad5 100644 --- a/packages/pl-fe/src/features/crypto-donate/components/crypto-donate-panel.tsx +++ b/packages/pl-fe/src/features/crypto-donate/components/crypto-donate-panel.tsx @@ -4,8 +4,8 @@ import { useHistory } from 'react-router-dom'; import Text from 'pl-fe/components/ui/text'; import Widget from 'pl-fe/components/ui/widget'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import SiteWallet from './site-wallet'; diff --git a/packages/pl-fe/src/features/crypto-donate/components/site-wallet.tsx b/packages/pl-fe/src/features/crypto-donate/components/site-wallet.tsx index ff174c9d58..f79e1ded7a 100644 --- a/packages/pl-fe/src/features/crypto-donate/components/site-wallet.tsx +++ b/packages/pl-fe/src/features/crypto-donate/components/site-wallet.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Stack from 'pl-fe/components/ui/stack'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import CryptoAddress from './crypto-address'; diff --git a/packages/pl-fe/src/features/crypto-donate/index.tsx b/packages/pl-fe/src/features/crypto-donate/index.tsx index 3573593876..863863c2db 100644 --- a/packages/pl-fe/src/features/crypto-donate/index.tsx +++ b/packages/pl-fe/src/features/crypto-donate/index.tsx @@ -4,7 +4,7 @@ import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; import Accordion from 'pl-fe/components/ui/accordion'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import SiteWallet from './components/site-wallet'; diff --git a/packages/pl-fe/src/features/delete-account/index.tsx b/packages/pl-fe/src/features/delete-account/index.tsx index 218e7ff50a..79d011ecc7 100644 --- a/packages/pl-fe/src/features/delete-account/index.tsx +++ b/packages/pl-fe/src/features/delete-account/index.tsx @@ -10,8 +10,8 @@ import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/developers/apps/create.tsx b/packages/pl-fe/src/features/developers/apps/create.tsx index c21d655058..8671a46394 100644 --- a/packages/pl-fe/src/features/developers/apps/create.tsx +++ b/packages/pl-fe/src/features/developers/apps/create.tsx @@ -12,8 +12,8 @@ import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { getBaseURL } from 'pl-fe/utils/accounts'; import type { Token } from 'pl-api'; diff --git a/packages/pl-fe/src/features/developers/developers-challenge.tsx b/packages/pl-fe/src/features/developers/developers-challenge.tsx index 8eb3ac190d..a7346943af 100644 --- a/packages/pl-fe/src/features/developers/developers-challenge.tsx +++ b/packages/pl-fe/src/features/developers/developers-challenge.tsx @@ -9,7 +9,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/developers/developers-menu.tsx b/packages/pl-fe/src/features/developers/developers-menu.tsx index cdc7473471..a05f6cf7ff 100644 --- a/packages/pl-fe/src/features/developers/developers-menu.tsx +++ b/packages/pl-fe/src/features/developers/developers-menu.tsx @@ -6,7 +6,7 @@ import { changeSetting } from 'pl-fe/actions/settings'; import Column from 'pl-fe/components/ui/column'; import SvgIcon from 'pl-fe/components/ui/svg-icon'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; import sourceCode from 'pl-fe/utils/code'; diff --git a/packages/pl-fe/src/features/developers/settings-store.tsx b/packages/pl-fe/src/features/developers/settings-store.tsx index bd1f1a3b1f..2d749f0fb5 100644 --- a/packages/pl-fe/src/features/developers/settings-store.tsx +++ b/packages/pl-fe/src/features/developers/settings-store.tsx @@ -11,7 +11,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Textarea from 'pl-fe/components/ui/textarea'; import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useSettingsStore } from 'pl-fe/stores/settings'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/directory/components/account-card.tsx b/packages/pl-fe/src/features/directory/components/account-card.tsx index c31c150bee..2676a9a8bc 100644 --- a/packages/pl-fe/src/features/directory/components/account-card.tsx +++ b/packages/pl-fe/src/features/directory/components/account-card.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Account from 'pl-fe/components/account'; import Badge from 'pl-fe/components/badge'; import HoverAccountWrapper from 'pl-fe/components/hover-account-wrapper'; @@ -12,7 +12,7 @@ import Avatar from 'pl-fe/components/ui/avatar'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import ActionButton from 'pl-fe/features/ui/components/action-button'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useSettingsStore } from 'pl-fe/stores/settings'; import { shortNumberFormat } from 'pl-fe/utils/numbers'; diff --git a/packages/pl-fe/src/features/directory/index.tsx b/packages/pl-fe/src/features/directory/index.tsx index 087640a01a..c2ce419eba 100644 --- a/packages/pl-fe/src/features/directory/index.tsx +++ b/packages/pl-fe/src/features/directory/index.tsx @@ -9,10 +9,10 @@ import { RadioGroup, RadioItem } from 'pl-fe/components/radio'; import { CardTitle } from 'pl-fe/components/ui/card'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import AccountCard from './components/account-card'; diff --git a/packages/pl-fe/src/features/domain-blocks/index.tsx b/packages/pl-fe/src/features/domain-blocks/index.tsx index cc0dc108d8..ef65863d86 100644 --- a/packages/pl-fe/src/features/domain-blocks/index.tsx +++ b/packages/pl-fe/src/features/domain-blocks/index.tsx @@ -7,8 +7,8 @@ import Domain from 'pl-fe/components/domain'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ heading: { id: 'column.domain_blocks', defaultMessage: 'Hidden domains' }, diff --git a/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx b/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx index d8f828ec01..0f25abb700 100644 --- a/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx +++ b/packages/pl-fe/src/features/draft-statuses/components/draft-status-action-bar.tsx @@ -5,7 +5,7 @@ import { setComposeToStatus } from 'pl-fe/actions/compose'; import { cancelDraftStatus } from 'pl-fe/actions/draft-statuses'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; import { useSettingsStore } from 'pl-fe/stores/settings'; diff --git a/packages/pl-fe/src/features/draft-statuses/components/draft-status.tsx b/packages/pl-fe/src/features/draft-statuses/components/draft-status.tsx index ff91da7980..25a61db0a9 100644 --- a/packages/pl-fe/src/features/draft-statuses/components/draft-status.tsx +++ b/packages/pl-fe/src/features/draft-statuses/components/draft-status.tsx @@ -10,7 +10,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container'; import PollPreview from 'pl-fe/features/ui/components/poll-preview'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { buildStatus } from '../builder'; diff --git a/packages/pl-fe/src/features/draft-statuses/index.tsx b/packages/pl-fe/src/features/draft-statuses/index.tsx index ba4bd5bd9d..8d405abee0 100644 --- a/packages/pl-fe/src/features/draft-statuses/index.tsx +++ b/packages/pl-fe/src/features/draft-statuses/index.tsx @@ -4,8 +4,8 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchDraftStatuses } from 'pl-fe/actions/draft-statuses'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import DraftStatus from './components/draft-status'; diff --git a/packages/pl-fe/src/features/edit-email/index.tsx b/packages/pl-fe/src/features/edit-email/index.tsx index 6bdf259aaa..fdab9d0581 100644 --- a/packages/pl-fe/src/features/edit-email/index.tsx +++ b/packages/pl-fe/src/features/edit-email/index.tsx @@ -8,7 +8,7 @@ import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/edit-password/index.tsx b/packages/pl-fe/src/features/edit-password/index.tsx index c21d732b27..6589e4c96e 100644 --- a/packages/pl-fe/src/features/edit-password/index.tsx +++ b/packages/pl-fe/src/features/edit-password/index.tsx @@ -8,7 +8,7 @@ import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx b/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx index 56bea17a15..890e3f7105 100644 --- a/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx +++ b/packages/pl-fe/src/features/edit-profile/components/avatar-picker.tsx @@ -6,7 +6,7 @@ import AltIndicator from 'pl-fe/components/alt-indicator'; import Avatar from 'pl-fe/components/ui/avatar'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; import { useModalsStore } from 'pl-fe/stores/modals'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx b/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx index 35f18b9249..1bb1a8e4ee 100644 --- a/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx +++ b/packages/pl-fe/src/features/edit-profile/components/header-picker.tsx @@ -7,7 +7,7 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import IconButton from 'pl-fe/components/ui/icon-button'; import Text from 'pl-fe/components/ui/text'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; import { useModalsStore } from 'pl-fe/stores/modals'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/edit-profile/index.tsx b/packages/pl-fe/src/features/edit-profile/index.tsx index 3be069724e..cc068e5df3 100644 --- a/packages/pl-fe/src/features/edit-profile/index.tsx +++ b/packages/pl-fe/src/features/edit-profile/index.tsx @@ -17,12 +17,12 @@ import Input from 'pl-fe/components/ui/input'; import Streamfield from 'pl-fe/components/ui/streamfield'; import Textarea from 'pl-fe/components/ui/textarea'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useImageField } from 'pl-fe/hooks/forms/useImageField'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useImageField } from 'pl-fe/hooks/forms/use-image-field'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import { isDefaultAvatar, isDefaultHeader } from 'pl-fe/utils/accounts'; diff --git a/packages/pl-fe/src/features/embedded-status/index.tsx b/packages/pl-fe/src/features/embedded-status/index.tsx index 914d7cc60a..5d9b24fab8 100644 --- a/packages/pl-fe/src/features/embedded-status/index.tsx +++ b/packages/pl-fe/src/features/embedded-status/index.tsx @@ -7,9 +7,9 @@ import MissingIndicator from 'pl-fe/components/missing-indicator'; import SiteLogo from 'pl-fe/components/site-logo'; import Status from 'pl-fe/components/status'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLogo } from 'pl-fe/hooks/useLogo'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLogo } from 'pl-fe/hooks/use-logo'; import { iframeId } from 'pl-fe/iframe'; import { makeGetStatus } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/emoji/components/emoji-picker-dropdown.tsx b/packages/pl-fe/src/features/emoji/components/emoji-picker-dropdown.tsx index 12f824d485..a43f076ef0 100644 --- a/packages/pl-fe/src/features/emoji/components/emoji-picker-dropdown.tsx +++ b/packages/pl-fe/src/features/emoji/components/emoji-picker-dropdown.tsx @@ -4,10 +4,10 @@ import { createSelector } from 'reselect'; import { chooseEmoji } from 'pl-fe/actions/emojis'; import { changeSetting } from 'pl-fe/actions/settings'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import { RootState } from 'pl-fe/store'; import { buildCustomEmojis } from '../../emoji'; diff --git a/packages/pl-fe/src/features/emoji/containers/emoji-picker-dropdown-container.tsx b/packages/pl-fe/src/features/emoji/containers/emoji-picker-dropdown-container.tsx index a6656c4a1d..b35490417d 100644 --- a/packages/pl-fe/src/features/emoji/containers/emoji-picker-dropdown-container.tsx +++ b/packages/pl-fe/src/features/emoji/containers/emoji-picker-dropdown-container.tsx @@ -5,7 +5,7 @@ import { defineMessages, useIntl } from 'react-intl'; import IconButton from 'pl-fe/components/ui/icon-button'; import Portal from 'pl-fe/components/ui/portal'; -import { useClickOutside } from 'pl-fe/hooks/useClickOutside'; +import { useClickOutside } from 'pl-fe/hooks/use-click-outside'; import EmojiPickerDropdown, { IEmojiPickerDropdown } from '../components/emoji-picker-dropdown'; diff --git a/packages/pl-fe/src/features/event/components/event-action-button.tsx b/packages/pl-fe/src/features/event/components/event-action-button.tsx index 9b9f036871..ee44f8b33a 100644 --- a/packages/pl-fe/src/features/event/components/event-action-button.tsx +++ b/packages/pl-fe/src/features/event/components/event-action-button.tsx @@ -3,8 +3,8 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { joinEvent, leaveEvent } from 'pl-fe/actions/events'; import Button from 'pl-fe/components/ui/button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { ButtonThemes } from 'pl-fe/components/ui/button/useButtonStyles'; diff --git a/packages/pl-fe/src/features/event/components/event-header.tsx b/packages/pl-fe/src/features/event/components/event-header.tsx index 07cdde0574..6d458b1006 100644 --- a/packages/pl-fe/src/features/event/components/event-header.tsx +++ b/packages/pl-fe/src/features/event/components/event-header.tsx @@ -20,10 +20,10 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { useChats } from 'pl-fe/queries/chats'; import { useModalsStore } from 'pl-fe/stores/modals'; import copy from 'pl-fe/utils/copy'; diff --git a/packages/pl-fe/src/features/event/event-discussion.tsx b/packages/pl-fe/src/features/event/event-discussion.tsx index 568c28b580..b104ba5994 100644 --- a/packages/pl-fe/src/features/event/event-discussion.tsx +++ b/packages/pl-fe/src/features/event/event-discussion.tsx @@ -10,8 +10,8 @@ import Tombstone from 'pl-fe/components/tombstone'; import Stack from 'pl-fe/components/ui/stack'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; import PendingStatus from 'pl-fe/features/ui/components/pending-status'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import ComposeForm from '../compose/components/compose-form'; diff --git a/packages/pl-fe/src/features/event/event-information.tsx b/packages/pl-fe/src/features/event/event-information.tsx index a5d817df8c..9c65541856 100644 --- a/packages/pl-fe/src/features/event/event-information.tsx +++ b/packages/pl-fe/src/features/event/event-information.tsx @@ -11,9 +11,9 @@ import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { makeGetStatus } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/events/components/event-carousel.tsx b/packages/pl-fe/src/features/events/components/event-carousel.tsx index 050a6a622b..726a1ee13a 100644 --- a/packages/pl-fe/src/features/events/components/event-carousel.tsx +++ b/packages/pl-fe/src/features/events/components/event-carousel.tsx @@ -5,7 +5,7 @@ import ReactSwipeableViews from 'react-swipeable-views'; import EventPreview from 'pl-fe/components/event-preview'; import Card from 'pl-fe/components/ui/card'; import Icon from 'pl-fe/components/ui/icon'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import PlaceholderEventPreview from '../../placeholder/components/placeholder-event-preview'; diff --git a/packages/pl-fe/src/features/events/index.tsx b/packages/pl-fe/src/features/events/index.tsx index 2f6c52538d..764edbd419 100644 --- a/packages/pl-fe/src/features/events/index.tsx +++ b/packages/pl-fe/src/features/events/index.tsx @@ -6,8 +6,8 @@ import Button from 'pl-fe/components/ui/button'; import { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card'; import Column from 'pl-fe/components/ui/column'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import EventCarousel from './components/event-carousel'; diff --git a/packages/pl-fe/src/features/export-data/components/csv-exporter.tsx b/packages/pl-fe/src/features/export-data/components/csv-exporter.tsx index 6fe25ab82c..22506e969b 100644 --- a/packages/pl-fe/src/features/export-data/components/csv-exporter.tsx +++ b/packages/pl-fe/src/features/export-data/components/csv-exporter.tsx @@ -5,7 +5,7 @@ import Button from 'pl-fe/components/ui/button'; import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { AppDispatch, RootState } from 'pl-fe/store'; interface ICSVExporter { diff --git a/packages/pl-fe/src/features/external-login/components/external-login-form.tsx b/packages/pl-fe/src/features/external-login/components/external-login-form.tsx index 383bfa2665..9c4e27cd9d 100644 --- a/packages/pl-fe/src/features/external-login/components/external-login-form.tsx +++ b/packages/pl-fe/src/features/external-login/components/external-login-form.tsx @@ -8,7 +8,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/favourited-statuses/index.tsx b/packages/pl-fe/src/features/favourited-statuses/index.tsx index ca18af7cf5..0d65f821fa 100644 --- a/packages/pl-fe/src/features/favourited-statuses/index.tsx +++ b/packages/pl-fe/src/features/favourited-statuses/index.tsx @@ -5,13 +5,13 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchAccount, fetchAccountByUsername } from 'pl-fe/actions/accounts'; import { fetchFavouritedStatuses, expandFavouritedStatuses, fetchAccountFavouritedStatuses, expandAccountFavouritedStatuses } from 'pl-fe/actions/favourites'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import StatusList from 'pl-fe/components/status-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; const messages = defineMessages({ heading: { id: 'column.favourited_statuses', defaultMessage: 'Liked posts' }, diff --git a/packages/pl-fe/src/features/federation-restrictions/components/instance-restrictions.tsx b/packages/pl-fe/src/features/federation-restrictions/components/instance-restrictions.tsx index d86c748af0..b537c292e3 100644 --- a/packages/pl-fe/src/features/federation-restrictions/components/instance-restrictions.tsx +++ b/packages/pl-fe/src/features/federation-restrictions/components/instance-restrictions.tsx @@ -5,7 +5,7 @@ import Icon from 'pl-fe/components/icon'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import type { RemoteInstance } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/federation-restrictions/components/restricted-instance.tsx b/packages/pl-fe/src/features/federation-restrictions/components/restricted-instance.tsx index 004315fad8..f709a9385d 100644 --- a/packages/pl-fe/src/features/federation-restrictions/components/restricted-instance.tsx +++ b/packages/pl-fe/src/features/federation-restrictions/components/restricted-instance.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React, { useState } from 'react'; import Icon from 'pl-fe/components/icon'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetRemoteInstance } from 'pl-fe/selectors'; import InstanceRestrictions from './instance-restrictions'; diff --git a/packages/pl-fe/src/features/federation-restrictions/index.tsx b/packages/pl-fe/src/features/federation-restrictions/index.tsx index 1f827d8403..4fa825e32c 100644 --- a/packages/pl-fe/src/features/federation-restrictions/index.tsx +++ b/packages/pl-fe/src/features/federation-restrictions/index.tsx @@ -4,8 +4,8 @@ import { defineMessages, useIntl } from 'react-intl'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Accordion from 'pl-fe/components/ui/accordion'; import Column from 'pl-fe/components/ui/column'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { makeGetHosts } from 'pl-fe/selectors'; import { federationRestrictionsDisclosed } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/features/feed-suggestions/feed-suggestions.tsx b/packages/pl-fe/src/features/feed-suggestions/feed-suggestions.tsx index 30229ff7eb..2d6bff48ca 100644 --- a/packages/pl-fe/src/features/feed-suggestions/feed-suggestions.tsx +++ b/packages/pl-fe/src/features/feed-suggestions/feed-suggestions.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Card, { CardBody, CardTitle } from 'pl-fe/components/ui/card'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import Emojify from '../emoji/emojify'; import ActionButton from '../ui/components/action-button'; diff --git a/packages/pl-fe/src/features/filters/edit-filter.tsx b/packages/pl-fe/src/features/filters/edit-filter.tsx index 113621db06..72c24c442d 100644 --- a/packages/pl-fe/src/features/filters/edit-filter.tsx +++ b/packages/pl-fe/src/features/filters/edit-filter.tsx @@ -16,8 +16,8 @@ import Stack from 'pl-fe/components/ui/stack'; import Streamfield from 'pl-fe/components/ui/streamfield'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import toast from 'pl-fe/toast'; import { SelectDropdown } from '../forms'; diff --git a/packages/pl-fe/src/features/filters/index.tsx b/packages/pl-fe/src/features/filters/index.tsx index b4e99a2194..37ba000689 100644 --- a/packages/pl-fe/src/features/filters/index.tsx +++ b/packages/pl-fe/src/features/filters/index.tsx @@ -10,9 +10,9 @@ import Column from 'pl-fe/components/ui/column'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/follow-requests/components/account-authorize.tsx b/packages/pl-fe/src/features/follow-requests/components/account-authorize.tsx index ecbf62c106..24b298e730 100644 --- a/packages/pl-fe/src/features/follow-requests/components/account-authorize.tsx +++ b/packages/pl-fe/src/features/follow-requests/components/account-authorize.tsx @@ -1,10 +1,10 @@ import React from 'react'; import { authorizeFollowRequest, rejectFollowRequest } from 'pl-fe/actions/accounts'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import Account from 'pl-fe/components/account'; import { AuthorizeRejectButtons } from 'pl-fe/components/authorize-reject-buttons'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; interface IAccountAuthorize { id: string; diff --git a/packages/pl-fe/src/features/follow-requests/index.tsx b/packages/pl-fe/src/features/follow-requests/index.tsx index 2121537ebb..01f8458583 100644 --- a/packages/pl-fe/src/features/follow-requests/index.tsx +++ b/packages/pl-fe/src/features/follow-requests/index.tsx @@ -6,8 +6,8 @@ import { fetchFollowRequests, expandFollowRequests } from 'pl-fe/actions/account import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import AccountAuthorize from './components/account-authorize'; diff --git a/packages/pl-fe/src/features/followed-tags/index.tsx b/packages/pl-fe/src/features/followed-tags/index.tsx index f69fb682d1..2cc0450936 100644 --- a/packages/pl-fe/src/features/followed-tags/index.tsx +++ b/packages/pl-fe/src/features/followed-tags/index.tsx @@ -7,8 +7,8 @@ import Hashtag from 'pl-fe/components/hashtag'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import PlaceholderHashtag from 'pl-fe/features/placeholder/components/placeholder-hashtag'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ heading: { id: 'column.followed_tags', defaultMessage: 'Followed hashtags' }, diff --git a/packages/pl-fe/src/features/followers/index.tsx b/packages/pl-fe/src/features/followers/index.tsx index 83b4f35e0f..f74e35ec82 100644 --- a/packages/pl-fe/src/features/followers/index.tsx +++ b/packages/pl-fe/src/features/followers/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useFollowers } from 'pl-fe/api/hooks/accounts/useAccountList'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useFollowers } from 'pl-fe/api/hooks/accounts/use-account-list'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import Account from 'pl-fe/components/account'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import ScrollableList from 'pl-fe/components/scrollable-list'; diff --git a/packages/pl-fe/src/features/following/index.tsx b/packages/pl-fe/src/features/following/index.tsx index d555ff8ebe..b97b9225df 100644 --- a/packages/pl-fe/src/features/following/index.tsx +++ b/packages/pl-fe/src/features/following/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useFollowing } from 'pl-fe/api/hooks/accounts/useAccountList'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useFollowing } from 'pl-fe/api/hooks/accounts/use-account-list'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import Account from 'pl-fe/components/account'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import ScrollableList from 'pl-fe/components/scrollable-list'; diff --git a/packages/pl-fe/src/features/group/components/group-action-button.tsx b/packages/pl-fe/src/features/group/components/group-action-button.tsx index ec588bdbe7..838ebff915 100644 --- a/packages/pl-fe/src/features/group/components/group-action-button.tsx +++ b/packages/pl-fe/src/features/group/components/group-action-button.tsx @@ -2,12 +2,12 @@ import { GroupRoles } from 'pl-api'; import React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useJoinGroup } from 'pl-fe/api/hooks/groups/useJoinGroup'; -import { useLeaveGroup } from 'pl-fe/api/hooks/groups/useLeaveGroup'; +import { useJoinGroup } from 'pl-fe/api/hooks/groups/use-join-group'; +import { useLeaveGroup } from 'pl-fe/api/hooks/groups/use-leave-group'; import Button from 'pl-fe/components/ui/button'; import { importEntities } from 'pl-fe/entity-store/actions'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/group/components/group-member-list-item.tsx b/packages/pl-fe/src/features/group/components/group-member-list-item.tsx index 8191c776a0..e8a79ee233 100644 --- a/packages/pl-fe/src/features/group/components/group-member-list-item.tsx +++ b/packages/pl-fe/src/features/group/components/group-member-list-item.tsx @@ -4,17 +4,17 @@ import React, { useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { groupKick } from 'pl-fe/actions/groups'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; -import { useBlockGroupMember } from 'pl-fe/api/hooks/groups/useBlockGroupMember'; -import { useDemoteGroupMember } from 'pl-fe/api/hooks/groups/useDemoteGroupMember'; -import { usePromoteGroupMember } from 'pl-fe/api/hooks/groups/usePromoteGroupMember'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; +import { useBlockGroupMember } from 'pl-fe/api/hooks/groups/use-block-group-member'; +import { useDemoteGroupMember } from 'pl-fe/api/hooks/groups/use-demote-group-member'; +import { usePromoteGroupMember } from 'pl-fe/api/hooks/groups/use-promote-group-member'; import Account from 'pl-fe/components/account'; import DropdownMenu from 'pl-fe/components/dropdown-menu/dropdown-menu'; import HStack from 'pl-fe/components/ui/hstack'; import { deleteEntities } from 'pl-fe/entity-store/actions'; import { Entities } from 'pl-fe/entity-store/entities'; import PlaceholderAccount from 'pl-fe/features/placeholder/components/placeholder-account'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/group/components/group-options-button.tsx b/packages/pl-fe/src/features/group/components/group-options-button.tsx index a7f741eb2f..f11092bec9 100644 --- a/packages/pl-fe/src/features/group/components/group-options-button.tsx +++ b/packages/pl-fe/src/features/group/components/group-options-button.tsx @@ -2,7 +2,7 @@ import { GroupRoles, type Group } from 'pl-api'; import React, { useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useLeaveGroup } from 'pl-fe/api/hooks/groups/useLeaveGroup'; +import { useLeaveGroup } from 'pl-fe/api/hooks/groups/use-leave-group'; import DropdownMenu, { Menu } from 'pl-fe/components/dropdown-menu'; import IconButton from 'pl-fe/components/ui/icon-button'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/group/edit-group.tsx b/packages/pl-fe/src/features/group/edit-group.tsx index e7c4ca0780..eb3ceefbe4 100644 --- a/packages/pl-fe/src/features/group/edit-group.tsx +++ b/packages/pl-fe/src/features/group/edit-group.tsx @@ -1,8 +1,8 @@ import React, { useState } from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useUpdateGroup } from 'pl-fe/api/hooks/groups/useUpdateGroup'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useUpdateGroup } from 'pl-fe/api/hooks/groups/use-update-group'; import Button from 'pl-fe/components/ui/button'; import Column from 'pl-fe/components/ui/column'; import Form from 'pl-fe/components/ui/form'; @@ -12,10 +12,10 @@ import Icon from 'pl-fe/components/ui/icon'; import Input from 'pl-fe/components/ui/input'; import Spinner from 'pl-fe/components/ui/spinner'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useImageField } from 'pl-fe/hooks/forms/useImageField'; -import { useTextField } from 'pl-fe/hooks/forms/useTextField'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useImageField } from 'pl-fe/hooks/forms/use-image-field'; +import { useTextField } from 'pl-fe/hooks/forms/use-text-field'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import toast from 'pl-fe/toast'; import { isDefaultAvatar, isDefaultHeader } from 'pl-fe/utils/accounts'; import { unescapeHTML } from 'pl-fe/utils/html'; diff --git a/packages/pl-fe/src/features/group/group-blocked-members.tsx b/packages/pl-fe/src/features/group/group-blocked-members.tsx index dc704d8259..97037adbe7 100644 --- a/packages/pl-fe/src/features/group/group-blocked-members.tsx +++ b/packages/pl-fe/src/features/group/group-blocked-members.tsx @@ -2,16 +2,16 @@ import React, { useEffect } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { fetchGroupBlocks, groupUnblock } from 'pl-fe/actions/groups'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; import Account from 'pl-fe/components/account'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; import Column from 'pl-fe/components/ui/column'; import HStack from 'pl-fe/components/ui/hstack'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import toast from 'pl-fe/toast'; import ColumnForbidden from '../ui/components/column-forbidden'; diff --git a/packages/pl-fe/src/features/group/group-gallery.tsx b/packages/pl-fe/src/features/group/group-gallery.tsx index dbf2e2220b..045a3ab5f4 100644 --- a/packages/pl-fe/src/features/group/group-gallery.tsx +++ b/packages/pl-fe/src/features/group/group-gallery.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupMedia } from 'pl-fe/api/hooks/groups/useGroupMedia'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupMedia } from 'pl-fe/api/hooks/groups/use-group-media'; import LoadMore from 'pl-fe/components/load-more'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import Column from 'pl-fe/components/ui/column'; diff --git a/packages/pl-fe/src/features/group/group-members.tsx b/packages/pl-fe/src/features/group/group-members.tsx index 7348d1402c..05e9dc1e9c 100644 --- a/packages/pl-fe/src/features/group/group-members.tsx +++ b/packages/pl-fe/src/features/group/group-members.tsx @@ -2,9 +2,9 @@ import clsx from 'clsx'; import { GroupRoles } from 'pl-api'; import React, { useMemo } from 'react'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupMembers } from 'pl-fe/api/hooks/groups/useGroupMembers'; -import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/useGroupMembershipRequests'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupMembers } from 'pl-fe/api/hooks/groups/use-group-members'; +import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/use-group-membership-requests'; import { PendingItemsRow } from 'pl-fe/components/pending-items-row'; import ScrollableList from 'pl-fe/components/scrollable-list'; diff --git a/packages/pl-fe/src/features/group/group-membership-requests.tsx b/packages/pl-fe/src/features/group/group-membership-requests.tsx index 024b9a2889..09792852c2 100644 --- a/packages/pl-fe/src/features/group/group-membership-requests.tsx +++ b/packages/pl-fe/src/features/group/group-membership-requests.tsx @@ -2,9 +2,9 @@ import { GroupRoles } from 'pl-api'; import React, { useEffect } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupMembers } from 'pl-fe/api/hooks/groups/useGroupMembers'; -import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/useGroupMembershipRequests'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupMembers } from 'pl-fe/api/hooks/groups/use-group-members'; +import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/use-group-membership-requests'; import Account from 'pl-fe/components/account'; import { AuthorizeRejectButtons } from 'pl-fe/components/authorize-reject-buttons'; import ScrollableList from 'pl-fe/components/scrollable-list'; diff --git a/packages/pl-fe/src/features/group/group-timeline.tsx b/packages/pl-fe/src/features/group/group-timeline.tsx index 2afb3f6683..02abdcb87a 100644 --- a/packages/pl-fe/src/features/group/group-timeline.tsx +++ b/packages/pl-fe/src/features/group/group-timeline.tsx @@ -5,18 +5,18 @@ import { Link } from 'react-router-dom'; import { groupCompose, uploadCompose } from 'pl-fe/actions/compose'; import { fetchGroupTimeline } from 'pl-fe/actions/timelines'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupStream } from 'pl-fe/api/hooks/streaming/useGroupStream'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupStream } from 'pl-fe/api/hooks/streaming/use-group-stream'; import Avatar from 'pl-fe/components/ui/avatar'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import ComposeForm from 'pl-fe/features/compose/components/compose-form'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { makeGetStatusIds } from 'pl-fe/selectors'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/group/manage-group.tsx b/packages/pl-fe/src/features/group/manage-group.tsx index de8637df67..bb2826ec8b 100644 --- a/packages/pl-fe/src/features/group/manage-group.tsx +++ b/packages/pl-fe/src/features/group/manage-group.tsx @@ -3,8 +3,8 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useHistory } from 'react-router-dom'; -import { useDeleteGroup } from 'pl-fe/api/hooks/groups/useDeleteGroup'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; +import { useDeleteGroup } from 'pl-fe/api/hooks/groups/use-delete-group'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; import List, { ListItem } from 'pl-fe/components/list'; import { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card'; import Column from 'pl-fe/components/ui/column'; diff --git a/packages/pl-fe/src/features/groups/index.tsx b/packages/pl-fe/src/features/groups/index.tsx index 2209fb04ad..688fd251ad 100644 --- a/packages/pl-fe/src/features/groups/index.tsx +++ b/packages/pl-fe/src/features/groups/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; -import { useGroups } from 'pl-fe/api/hooks/groups/useGroups'; +import { useGroups } from 'pl-fe/api/hooks/groups/use-groups'; import GroupCard from 'pl-fe/components/group-card'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Button from 'pl-fe/components/ui/button'; diff --git a/packages/pl-fe/src/features/hashtag-timeline/index.tsx b/packages/pl-fe/src/features/hashtag-timeline/index.tsx index 35715e7107..4b39f2e695 100644 --- a/packages/pl-fe/src/features/hashtag-timeline/index.tsx +++ b/packages/pl-fe/src/features/hashtag-timeline/index.tsx @@ -3,17 +3,17 @@ import { FormattedMessage } from 'react-intl'; import { fetchHashtag, followHashtag, unfollowHashtag } from 'pl-fe/actions/tags'; import { fetchHashtagTimeline, clearTimeline } from 'pl-fe/actions/timelines'; -import { useHashtagStream } from 'pl-fe/api/hooks/streaming/useHashtagStream'; +import { useHashtagStream } from 'pl-fe/api/hooks/streaming/use-hashtag-stream'; import List, { ListItem } from 'pl-fe/components/list'; import Column from 'pl-fe/components/ui/column'; import Toggle from 'pl-fe/components/ui/toggle'; import Timeline from 'pl-fe/features/ui/components/timeline'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; +import { useTheme } from 'pl-fe/hooks/use-theme'; interface IHashtagTimeline { params?: { diff --git a/packages/pl-fe/src/features/home-timeline/index.tsx b/packages/pl-fe/src/features/home-timeline/index.tsx index 71a74f0e40..2325800463 100644 --- a/packages/pl-fe/src/features/home-timeline/index.tsx +++ b/packages/pl-fe/src/features/home-timeline/index.tsx @@ -8,12 +8,12 @@ import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Timeline from 'pl-fe/features/ui/components/timeline'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; const messages = defineMessages({ title: { id: 'column.home', defaultMessage: 'Home' }, diff --git a/packages/pl-fe/src/features/import-data/components/data-importer.tsx b/packages/pl-fe/src/features/import-data/components/data-importer.tsx index 950478d7cd..4ad7dec5dc 100644 --- a/packages/pl-fe/src/features/import-data/components/data-importer.tsx +++ b/packages/pl-fe/src/features/import-data/components/data-importer.tsx @@ -9,7 +9,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import type { AppDispatch, RootState } from 'pl-fe/store'; diff --git a/packages/pl-fe/src/features/import-data/index.tsx b/packages/pl-fe/src/features/import-data/index.tsx index 7d04c82b5a..d46c9b6daf 100644 --- a/packages/pl-fe/src/features/import-data/index.tsx +++ b/packages/pl-fe/src/features/import-data/index.tsx @@ -7,7 +7,7 @@ import { importMutes, } from 'pl-fe/actions/import-data'; import Column from 'pl-fe/components/ui/column'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import DataImporter from './components/data-importer'; diff --git a/packages/pl-fe/src/features/interaction-policies/index.tsx b/packages/pl-fe/src/features/interaction-policies/index.tsx index 33ff879d6d..398a2817c7 100644 --- a/packages/pl-fe/src/features/interaction-policies/index.tsx +++ b/packages/pl-fe/src/features/interaction-policies/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; -import { useInteractionPolicies } from 'pl-fe/api/hooks/settings/useInteractionPolicies'; +import { useInteractionPolicies } from 'pl-fe/api/hooks/settings/use-interaction-policies'; import List, { ListItem } from 'pl-fe/components/list'; import Button from 'pl-fe/components/ui/button'; import { CardTitle } from 'pl-fe/components/ui/card'; diff --git a/packages/pl-fe/src/features/landing-timeline/components/site-banner.tsx b/packages/pl-fe/src/features/landing-timeline/components/site-banner.tsx index bbd0ecacf6..a82bcc84ec 100644 --- a/packages/pl-fe/src/features/landing-timeline/components/site-banner.tsx +++ b/packages/pl-fe/src/features/landing-timeline/components/site-banner.tsx @@ -3,7 +3,7 @@ import React from 'react'; import Markup from 'pl-fe/components/markup'; import { ParsedContent } from 'pl-fe/components/parsed-content'; import Stack from 'pl-fe/components/ui/stack'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import { getTextDirection } from 'pl-fe/utils/rtl'; import { LogoText } from './logo-text'; diff --git a/packages/pl-fe/src/features/landing-timeline/index.tsx b/packages/pl-fe/src/features/landing-timeline/index.tsx index 5e558e7fb6..25fc67af48 100644 --- a/packages/pl-fe/src/features/landing-timeline/index.tsx +++ b/packages/pl-fe/src/features/landing-timeline/index.tsx @@ -2,13 +2,13 @@ import React, { useEffect } from 'react'; import { FormattedMessage } from 'react-intl'; import { fetchPublicTimeline } from 'pl-fe/actions/timelines'; -import { useCommunityStream } from 'pl-fe/api/hooks/streaming/useCommunityStream'; +import { useCommunityStream } from 'pl-fe/api/hooks/streaming/use-community-stream'; import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import AboutPage from '../about'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/list-timeline/index.tsx b/packages/pl-fe/src/features/list-timeline/index.tsx index f4794c400a..0b689d5fdf 100644 --- a/packages/pl-fe/src/features/list-timeline/index.tsx +++ b/packages/pl-fe/src/features/list-timeline/index.tsx @@ -4,16 +4,16 @@ import { useParams } from 'react-router-dom'; import { deleteList, fetchList } from 'pl-fe/actions/lists'; import { fetchListTimeline } from 'pl-fe/actions/timelines'; -import { useListStream } from 'pl-fe/api/hooks/streaming/useListStream'; +import { useListStream } from 'pl-fe/api/hooks/streaming/use-list-stream'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import Button from 'pl-fe/components/ui/button'; import Column from 'pl-fe/components/ui/column'; import Spinner from 'pl-fe/components/ui/spinner'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import { useModalsStore } from 'pl-fe/stores/modals'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/lists/components/new-list-form.tsx b/packages/pl-fe/src/features/lists/components/new-list-form.tsx index 5b7802fe8c..7ff588170e 100644 --- a/packages/pl-fe/src/features/lists/components/new-list-form.tsx +++ b/packages/pl-fe/src/features/lists/components/new-list-form.tsx @@ -6,8 +6,8 @@ import Button from 'pl-fe/components/ui/button'; import Form from 'pl-fe/components/ui/form'; import HStack from 'pl-fe/components/ui/hstack'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ label: { id: 'lists.new.title_placeholder', defaultMessage: 'New list title' }, diff --git a/packages/pl-fe/src/features/lists/index.tsx b/packages/pl-fe/src/features/lists/index.tsx index 6ccb2473ee..77e100f333 100644 --- a/packages/pl-fe/src/features/lists/index.tsx +++ b/packages/pl-fe/src/features/lists/index.tsx @@ -10,8 +10,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import NewListForm from './components/new-list-form'; diff --git a/packages/pl-fe/src/features/migration/index.tsx b/packages/pl-fe/src/features/migration/index.tsx index 3f74d21105..d1ca4df7f7 100644 --- a/packages/pl-fe/src/features/migration/index.tsx +++ b/packages/pl-fe/src/features/migration/index.tsx @@ -10,8 +10,8 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/mutes/index.tsx b/packages/pl-fe/src/features/mutes/index.tsx index d5a4f93ba9..dcbf5c0176 100644 --- a/packages/pl-fe/src/features/mutes/index.tsx +++ b/packages/pl-fe/src/features/mutes/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { defineMessages, useIntl, FormattedMessage } from 'react-intl'; -import { useMutes } from 'pl-fe/api/hooks/accounts/useAccountList'; +import { useMutes } from 'pl-fe/api/hooks/accounts/use-account-list'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; diff --git a/packages/pl-fe/src/features/notifications/components/filter-bar.tsx b/packages/pl-fe/src/features/notifications/components/filter-bar.tsx index 77680bb520..cacb2ae153 100644 --- a/packages/pl-fe/src/features/notifications/components/filter-bar.tsx +++ b/packages/pl-fe/src/features/notifications/components/filter-bar.tsx @@ -4,9 +4,9 @@ import { defineMessages, useIntl } from 'react-intl'; import { type FilterType, setFilter } from 'pl-fe/actions/notifications'; import Icon from 'pl-fe/components/ui/icon'; import Tabs from 'pl-fe/components/ui/tabs'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import type { Item } from 'pl-fe/components/ui/tabs'; diff --git a/packages/pl-fe/src/features/notifications/components/notification.tsx b/packages/pl-fe/src/features/notifications/components/notification.tsx index 7215c563a8..160920b976 100644 --- a/packages/pl-fe/src/features/notifications/components/notification.tsx +++ b/packages/pl-fe/src/features/notifications/components/notification.tsx @@ -15,10 +15,10 @@ import AccountContainer from 'pl-fe/containers/account-container'; import StatusContainer from 'pl-fe/containers/status-container'; import Emojify from 'pl-fe/features/emoji/emojify'; import { HotKeys } from 'pl-fe/features/ui/components/hotkeys'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { makeGetNotification } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; import { useSettingsStore } from 'pl-fe/stores/settings'; diff --git a/packages/pl-fe/src/features/notifications/index.tsx b/packages/pl-fe/src/features/notifications/index.tsx index a7f5a247d6..ca0022437b 100644 --- a/packages/pl-fe/src/features/notifications/index.tsx +++ b/packages/pl-fe/src/features/notifications/index.tsx @@ -16,9 +16,9 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; import Portal from 'pl-fe/components/ui/portal'; import PlaceholderNotification from 'pl-fe/features/placeholder/components/placeholder-notification'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import FilterBar from './components/filter-bar'; import Notification from './components/notification'; diff --git a/packages/pl-fe/src/features/onboarding/onboarding-wizard.tsx b/packages/pl-fe/src/features/onboarding/onboarding-wizard.tsx index 1a2880a622..90edfa4bd3 100644 --- a/packages/pl-fe/src/features/onboarding/onboarding-wizard.tsx +++ b/packages/pl-fe/src/features/onboarding/onboarding-wizard.tsx @@ -5,8 +5,8 @@ import ReactSwipeableViews from 'react-swipeable-views'; import { endOnboarding } from 'pl-fe/actions/onboarding'; import LandingGradient from 'pl-fe/components/landing-gradient'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import AvatarSelectionStep from './steps/avatar-selection-step'; import BioStep from './steps/bio-step'; diff --git a/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx b/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx index 8ebd72704c..a5f6eaa482 100644 --- a/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx @@ -9,8 +9,8 @@ import Button from 'pl-fe/components/ui/button'; import Icon from 'pl-fe/components/ui/icon'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import { isDefaultAvatar } from 'pl-fe/utils/accounts'; import resizeImage from 'pl-fe/utils/resize-image'; diff --git a/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx b/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx index a2abcc71ab..a7be475658 100644 --- a/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx @@ -7,8 +7,8 @@ import Button from 'pl-fe/components/ui/button'; import FormGroup from 'pl-fe/components/ui/form-group'; import Stack from 'pl-fe/components/ui/stack'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import type { PlfeResponse } from 'pl-fe/api'; diff --git a/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx b/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx index ca5bbf3272..4273ffd05f 100644 --- a/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx @@ -11,8 +11,8 @@ import Icon from 'pl-fe/components/ui/icon'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import { isDefaultHeader } from 'pl-fe/utils/accounts'; import resizeImage from 'pl-fe/utils/resize-image'; diff --git a/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx b/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx index d94dae60d9..e795fa4bfa 100644 --- a/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx @@ -7,8 +7,8 @@ import Button from 'pl-fe/components/ui/button'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import type { PlfeResponse } from 'pl-fe/api'; diff --git a/packages/pl-fe/src/features/onboarding/steps/fediverse-step.tsx b/packages/pl-fe/src/features/onboarding/steps/fediverse-step.tsx index a278e2b203..46b0fbe789 100644 --- a/packages/pl-fe/src/features/onboarding/steps/fediverse-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/fediverse-step.tsx @@ -7,8 +7,8 @@ import Card, { CardBody } from 'pl-fe/components/ui/card'; import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; const FediverseStep = ({ onNext }: { onNext: () => void }) => { const { account } = useOwnAccount(); diff --git a/packages/pl-fe/src/features/pinned-statuses/index.tsx b/packages/pl-fe/src/features/pinned-statuses/index.tsx index 9b7010d64f..7ebbe0bb3f 100644 --- a/packages/pl-fe/src/features/pinned-statuses/index.tsx +++ b/packages/pl-fe/src/features/pinned-statuses/index.tsx @@ -6,8 +6,8 @@ import { fetchPinnedStatuses } from 'pl-fe/actions/pin-statuses'; import MissingIndicator from 'pl-fe/components/missing-indicator'; import StatusList from 'pl-fe/components/status-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { selectOwnAccount } from 'pl-fe/selectors'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx b/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx index bb78fca479..094ed113bb 100644 --- a/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx +++ b/packages/pl-fe/src/features/pl-fe-config/components/site-preview.tsx @@ -3,7 +3,7 @@ import React, { useMemo } from 'react'; import { FormattedMessage } from 'react-intl'; import BackgroundShapes from 'pl-fe/features/ui/components/background-shapes'; -import { useSystemTheme } from 'pl-fe/hooks/useSystemTheme'; +import { useSystemTheme } from 'pl-fe/hooks/use-system-theme'; import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config'; import { useSettingsStore } from 'pl-fe/stores/settings'; import { generateThemeCss } from 'pl-fe/utils/theme'; diff --git a/packages/pl-fe/src/features/pl-fe-config/index.tsx b/packages/pl-fe/src/features/pl-fe-config/index.tsx index 23fd02c085..006affe36f 100644 --- a/packages/pl-fe/src/features/pl-fe-config/index.tsx +++ b/packages/pl-fe/src/features/pl-fe-config/index.tsx @@ -18,9 +18,9 @@ import Streamfield from 'pl-fe/components/ui/streamfield'; import Textarea from 'pl-fe/components/ui/textarea'; import Toggle from 'pl-fe/components/ui/toggle'; import ThemeSelector from 'pl-fe/features/ui/components/theme-selector'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/preferences/index.tsx b/packages/pl-fe/src/features/preferences/index.tsx index 8c8f635c12..1d63cff63d 100644 --- a/packages/pl-fe/src/features/preferences/index.tsx +++ b/packages/pl-fe/src/features/preferences/index.tsx @@ -7,10 +7,10 @@ import List, { ListItem } from 'pl-fe/components/list'; import Form from 'pl-fe/components/ui/form'; import { Mutliselect, SelectDropdown } from 'pl-fe/features/forms'; import SettingToggle from 'pl-fe/features/notifications/components/setting-toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import ThemeToggle from '../ui/components/theme-toggle'; diff --git a/packages/pl-fe/src/features/public-timeline/index.tsx b/packages/pl-fe/src/features/public-timeline/index.tsx index d6b387c1eb..9f64cbebd8 100644 --- a/packages/pl-fe/src/features/public-timeline/index.tsx +++ b/packages/pl-fe/src/features/public-timeline/index.tsx @@ -4,15 +4,15 @@ import { Link } from 'react-router-dom'; import { changeSetting } from 'pl-fe/actions/settings'; import { fetchPublicTimeline } from 'pl-fe/actions/timelines'; -import { usePublicStream } from 'pl-fe/api/hooks/streaming/usePublicStream'; +import { usePublicStream } from 'pl-fe/api/hooks/streaming/use-public-stream'; import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import Accordion from 'pl-fe/components/ui/accordion'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/quotes/index.tsx b/packages/pl-fe/src/features/quotes/index.tsx index 715b00ee6d..5e3cff669d 100644 --- a/packages/pl-fe/src/features/quotes/index.tsx +++ b/packages/pl-fe/src/features/quotes/index.tsx @@ -7,10 +7,10 @@ import { useParams } from 'react-router-dom'; import { expandStatusQuotes, fetchStatusQuotes } from 'pl-fe/actions/status-quotes'; import StatusList from 'pl-fe/components/status-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; const messages = defineMessages({ heading: { id: 'column.quotes', defaultMessage: 'Post quotes' }, diff --git a/packages/pl-fe/src/features/register-invite/index.tsx b/packages/pl-fe/src/features/register-invite/index.tsx index 3130a56d6d..4591d32229 100644 --- a/packages/pl-fe/src/features/register-invite/index.tsx +++ b/packages/pl-fe/src/features/register-invite/index.tsx @@ -4,7 +4,7 @@ import { useParams } from 'react-router-dom'; import { BigCard } from 'pl-fe/components/big-card'; import RegistrationForm from 'pl-fe/features/auth-login/components/registration-form'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; interface RegisterInviteParams { token: string; diff --git a/packages/pl-fe/src/features/remote-timeline/components/pinned-hosts-picker.tsx b/packages/pl-fe/src/features/remote-timeline/components/pinned-hosts-picker.tsx index c883a7bd34..1644b7e60e 100644 --- a/packages/pl-fe/src/features/remote-timeline/components/pinned-hosts-picker.tsx +++ b/packages/pl-fe/src/features/remote-timeline/components/pinned-hosts-picker.tsx @@ -2,7 +2,7 @@ import React from 'react'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; interface IPinnedHostsPicker { /** The active host among pinned hosts. */ diff --git a/packages/pl-fe/src/features/remote-timeline/index.tsx b/packages/pl-fe/src/features/remote-timeline/index.tsx index 15c334819a..6516889971 100644 --- a/packages/pl-fe/src/features/remote-timeline/index.tsx +++ b/packages/pl-fe/src/features/remote-timeline/index.tsx @@ -3,15 +3,15 @@ import { FormattedMessage } from 'react-intl'; import { useHistory } from 'react-router-dom'; import { fetchPublicTimeline } from 'pl-fe/actions/timelines'; -import { useRemoteStream } from 'pl-fe/api/hooks/streaming/useRemoteStream'; +import { useRemoteStream } from 'pl-fe/api/hooks/streaming/use-remote-stream'; import IconButton from 'pl-fe/components/icon-button'; import Column from 'pl-fe/components/ui/column'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import Timeline from '../ui/components/timeline'; diff --git a/packages/pl-fe/src/features/reply-mentions/account.tsx b/packages/pl-fe/src/features/reply-mentions/account.tsx index e34241757e..f316a20eaa 100644 --- a/packages/pl-fe/src/features/reply-mentions/account.tsx +++ b/packages/pl-fe/src/features/reply-mentions/account.tsx @@ -3,11 +3,11 @@ import { defineMessages, useIntl } from 'react-intl'; import { fetchAccount } from 'pl-fe/actions/accounts'; import { addToMentions, removeFromMentions } from 'pl-fe/actions/compose'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import AccountComponent from 'pl-fe/components/account'; import IconButton from 'pl-fe/components/icon-button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; const messages = defineMessages({ remove: { id: 'reply_mentions.account.remove', defaultMessage: 'Remove from mentions' }, diff --git a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx index d7efac1e5b..3f3e201245 100644 --- a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx +++ b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status-action-bar.tsx @@ -4,7 +4,7 @@ import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { cancelScheduledStatus } from 'pl-fe/actions/scheduled-statuses'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; import { useSettingsStore } from 'pl-fe/stores/settings'; diff --git a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status.tsx b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status.tsx index b4c5f98a28..df705d84e3 100644 --- a/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status.tsx +++ b/packages/pl-fe/src/features/scheduled-statuses/components/scheduled-status.tsx @@ -8,7 +8,7 @@ import StatusReplyMentions from 'pl-fe/components/status-reply-mentions'; import HStack from 'pl-fe/components/ui/hstack'; import Stack from 'pl-fe/components/ui/stack'; import PollPreview from 'pl-fe/features/ui/components/poll-preview'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { buildStatus } from '../builder'; diff --git a/packages/pl-fe/src/features/scheduled-statuses/index.tsx b/packages/pl-fe/src/features/scheduled-statuses/index.tsx index cca9dfa11c..893037152c 100644 --- a/packages/pl-fe/src/features/scheduled-statuses/index.tsx +++ b/packages/pl-fe/src/features/scheduled-statuses/index.tsx @@ -5,8 +5,8 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { fetchScheduledStatuses, expandScheduledStatuses } from 'pl-fe/actions/scheduled-statuses'; import ScrollableList from 'pl-fe/components/scrollable-list'; import Column from 'pl-fe/components/ui/column'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import ScheduledStatus from './components/scheduled-status'; diff --git a/packages/pl-fe/src/features/search/components/search-results.tsx b/packages/pl-fe/src/features/search/components/search-results.tsx index b8d099da84..cf0c9a8720 100644 --- a/packages/pl-fe/src/features/search/components/search-results.tsx +++ b/packages/pl-fe/src/features/search/components/search-results.tsx @@ -4,8 +4,8 @@ import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { expandSearch, setFilter, setSearchAccount } from 'pl-fe/actions/search'; import { fetchTrendingStatuses } from 'pl-fe/actions/trending-statuses'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; -import { useTrendingLinks } from 'pl-fe/api/hooks/trends/useTrendingLinks'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; +import { useTrendingLinks } from 'pl-fe/api/hooks/trends/use-trending-links'; import Hashtag from 'pl-fe/components/hashtag'; import IconButton from 'pl-fe/components/icon-button'; import ScrollableList from 'pl-fe/components/scrollable-list'; @@ -18,9 +18,9 @@ import StatusContainer from 'pl-fe/containers/status-container'; import PlaceholderAccount from 'pl-fe/features/placeholder/components/placeholder-account'; import PlaceholderHashtag from 'pl-fe/features/placeholder/components/placeholder-hashtag'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { SearchFilter } from 'pl-fe/reducers/search'; diff --git a/packages/pl-fe/src/features/search/components/search.tsx b/packages/pl-fe/src/features/search/components/search.tsx index 89653891d4..b487a66705 100644 --- a/packages/pl-fe/src/features/search/components/search.tsx +++ b/packages/pl-fe/src/features/search/components/search.tsx @@ -14,8 +14,8 @@ import { import AutosuggestAccountInput from 'pl-fe/components/autosuggest-account-input'; import Input from 'pl-fe/components/ui/input'; import SvgIcon from 'pl-fe/components/ui/svg-icon'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { selectAccount } from 'pl-fe/selectors'; import { AppDispatch, RootState } from 'pl-fe/store'; diff --git a/packages/pl-fe/src/features/security/mfa-form.tsx b/packages/pl-fe/src/features/security/mfa-form.tsx index 88bcdc8d4d..cc489b4181 100644 --- a/packages/pl-fe/src/features/security/mfa-form.tsx +++ b/packages/pl-fe/src/features/security/mfa-form.tsx @@ -4,8 +4,8 @@ import { useIntl, defineMessages } from 'react-intl'; import { fetchMfa } from 'pl-fe/actions/mfa'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import DisableOtpForm from './mfa/disable-otp-form'; import EnableOtpForm from './mfa/enable-otp-form'; diff --git a/packages/pl-fe/src/features/security/mfa/disable-otp-form.tsx b/packages/pl-fe/src/features/security/mfa/disable-otp-form.tsx index 742cbffda0..4e088cb3d7 100644 --- a/packages/pl-fe/src/features/security/mfa/disable-otp-form.tsx +++ b/packages/pl-fe/src/features/security/mfa/disable-otp-form.tsx @@ -10,7 +10,7 @@ import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/security/mfa/enable-otp-form.tsx b/packages/pl-fe/src/features/security/mfa/enable-otp-form.tsx index 62113c2408..ff21eeba60 100644 --- a/packages/pl-fe/src/features/security/mfa/enable-otp-form.tsx +++ b/packages/pl-fe/src/features/security/mfa/enable-otp-form.tsx @@ -8,7 +8,7 @@ import FormActions from 'pl-fe/components/ui/form-actions'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/security/mfa/otp-confirm-form.tsx b/packages/pl-fe/src/features/security/mfa/otp-confirm-form.tsx index 3517680660..ec1fb4e77c 100644 --- a/packages/pl-fe/src/features/security/mfa/otp-confirm-form.tsx +++ b/packages/pl-fe/src/features/security/mfa/otp-confirm-form.tsx @@ -11,7 +11,7 @@ import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/server-info/index.tsx b/packages/pl-fe/src/features/server-info/index.tsx index b3dc3a3997..3c2928ee36 100644 --- a/packages/pl-fe/src/features/server-info/index.tsx +++ b/packages/pl-fe/src/features/server-info/index.tsx @@ -5,7 +5,7 @@ import Column from 'pl-fe/components/ui/column'; import Divider from 'pl-fe/components/ui/divider'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import LinkFooter from '../ui/components/link-footer'; import PromoPanel from '../ui/components/panels/promo-panel'; diff --git a/packages/pl-fe/src/features/settings/components/messages-settings.tsx b/packages/pl-fe/src/features/settings/components/messages-settings.tsx index 28c8ed2243..b57591b7f0 100644 --- a/packages/pl-fe/src/features/settings/components/messages-settings.tsx +++ b/packages/pl-fe/src/features/settings/components/messages-settings.tsx @@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl'; import List, { ListItem } from 'pl-fe/components/list'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { useUpdateCredentials } from 'pl-fe/queries/accounts'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/settings/index.tsx b/packages/pl-fe/src/features/settings/index.tsx index 20c1eba585..965a394f74 100644 --- a/packages/pl-fe/src/features/settings/index.tsx +++ b/packages/pl-fe/src/features/settings/index.tsx @@ -6,10 +6,10 @@ import List, { ListItem } from 'pl-fe/components/list'; import Card, { CardBody, CardHeader, CardTitle } from 'pl-fe/components/ui/card'; import Column from 'pl-fe/components/ui/column'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import Preferences from '../preferences'; diff --git a/packages/pl-fe/src/features/share/index.tsx b/packages/pl-fe/src/features/share/index.tsx index b6068d8e3d..335a1a0fd5 100644 --- a/packages/pl-fe/src/features/share/index.tsx +++ b/packages/pl-fe/src/features/share/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Redirect, useLocation } from 'react-router-dom'; import { openComposeWithText } from 'pl-fe/actions/compose'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; const Share = () => { const dispatch = useAppDispatch(); diff --git a/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx b/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx index f0305c9ffd..dd47f33d37 100644 --- a/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx +++ b/packages/pl-fe/src/features/status/components/status-interaction-bar.tsx @@ -6,7 +6,7 @@ import { Link } from 'react-router-dom'; import AnimatedNumber from 'pl-fe/components/animated-number'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useModalsStore } from 'pl-fe/stores/modals'; import type { Status } from 'pl-fe/normalizers/status'; diff --git a/packages/pl-fe/src/features/status/components/thread-login-cta.tsx b/packages/pl-fe/src/features/status/components/thread-login-cta.tsx index 79c5c63b4e..1c3167dd68 100644 --- a/packages/pl-fe/src/features/status/components/thread-login-cta.tsx +++ b/packages/pl-fe/src/features/status/components/thread-login-cta.tsx @@ -5,8 +5,8 @@ import Button from 'pl-fe/components/ui/button'; import Card, { CardTitle } from 'pl-fe/components/ui/card'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; /** Prompts logged-out users to log in when viewing a thread. */ const ThreadLoginCta: React.FC = () => { diff --git a/packages/pl-fe/src/features/status/components/thread-status.tsx b/packages/pl-fe/src/features/status/components/thread-status.tsx index 8ad512aa59..ecd7bb12f6 100644 --- a/packages/pl-fe/src/features/status/components/thread-status.tsx +++ b/packages/pl-fe/src/features/status/components/thread-status.tsx @@ -4,7 +4,7 @@ import React from 'react'; import StatusContainer from 'pl-fe/containers/status-container'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; interface IThreadStatus { id: string; diff --git a/packages/pl-fe/src/features/status/components/thread.tsx b/packages/pl-fe/src/features/status/components/thread.tsx index 1b66db862f..cba00e47a9 100644 --- a/packages/pl-fe/src/features/status/components/thread.tsx +++ b/packages/pl-fe/src/features/status/components/thread.tsx @@ -16,8 +16,8 @@ import Stack from 'pl-fe/components/ui/stack'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; import { HotKeys } from 'pl-fe/features/ui/components/hotkeys'; import PendingStatus from 'pl-fe/features/ui/components/pending-status'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { RootState } from 'pl-fe/store'; import { useModalsStore } from 'pl-fe/stores/modals'; import { useSettingsStore } from 'pl-fe/stores/settings'; diff --git a/packages/pl-fe/src/features/status/containers/quoted-status-container.tsx b/packages/pl-fe/src/features/status/containers/quoted-status-container.tsx index b0d537c127..48e0fb4910 100644 --- a/packages/pl-fe/src/features/status/containers/quoted-status-container.tsx +++ b/packages/pl-fe/src/features/status/containers/quoted-status-container.tsx @@ -1,7 +1,7 @@ import React, { useCallback } from 'react'; import QuotedStatus from 'pl-fe/components/quoted-status'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; interface IQuotedStatusContainer { diff --git a/packages/pl-fe/src/features/status/index.tsx b/packages/pl-fe/src/features/status/index.tsx index edbed0f613..8b5955df37 100644 --- a/packages/pl-fe/src/features/status/index.tsx +++ b/packages/pl-fe/src/features/status/index.tsx @@ -8,9 +8,9 @@ import PullToRefresh from 'pl-fe/components/pull-to-refresh'; import Column from 'pl-fe/components/ui/column'; import Stack from 'pl-fe/components/ui/stack'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { makeGetStatus } from 'pl-fe/selectors'; import Thread from './components/thread'; diff --git a/packages/pl-fe/src/features/test-timeline/index.tsx b/packages/pl-fe/src/features/test-timeline/index.tsx index 564f105d36..fbfc8f0637 100644 --- a/packages/pl-fe/src/features/test-timeline/index.tsx +++ b/packages/pl-fe/src/features/test-timeline/index.tsx @@ -5,9 +5,9 @@ import { importFetchedStatuses } from 'pl-fe/actions/importer'; import { expandTimelineSuccess } from 'pl-fe/actions/timelines'; import Column from 'pl-fe/components/ui/column'; import Timeline from 'pl-fe/features/ui/components/timeline'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useTheme } from 'pl-fe/hooks/use-theme'; const messages = defineMessages({ title: { id: 'column.test', defaultMessage: 'Test timeline' }, diff --git a/packages/pl-fe/src/features/theme-editor/components/palette.tsx b/packages/pl-fe/src/features/theme-editor/components/palette.tsx index 430bc11dda..cb8c1b6afe 100644 --- a/packages/pl-fe/src/features/theme-editor/components/palette.tsx +++ b/packages/pl-fe/src/features/theme-editor/components/palette.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react'; import HStack from 'pl-fe/components/ui/hstack'; import Slider from 'pl-fe/components/ui/slider'; import Stack from 'pl-fe/components/ui/stack'; -import { usePrevious } from 'pl-fe/hooks/usePrevious'; +import { usePrevious } from 'pl-fe/hooks/use-previous'; import { compareId } from 'pl-fe/utils/comparators'; import { hueShift } from 'pl-fe/utils/theme'; diff --git a/packages/pl-fe/src/features/theme-editor/index.tsx b/packages/pl-fe/src/features/theme-editor/index.tsx index 2bd5384d37..9361618f2e 100644 --- a/packages/pl-fe/src/features/theme-editor/index.tsx +++ b/packages/pl-fe/src/features/theme-editor/index.tsx @@ -11,9 +11,9 @@ import Column from 'pl-fe/components/ui/column'; import Form from 'pl-fe/components/ui/form'; import FormActions from 'pl-fe/components/ui/form-actions'; import ColorPicker from 'pl-fe/features/pl-fe-config/components/color-picker'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config'; import toast from 'pl-fe/toast'; import { download } from 'pl-fe/utils/download'; diff --git a/packages/pl-fe/src/features/ui/components/action-button.tsx b/packages/pl-fe/src/features/ui/components/action-button.tsx index 206c468288..30c7713586 100644 --- a/packages/pl-fe/src/features/ui/components/action-button.tsx +++ b/packages/pl-fe/src/features/ui/components/action-button.tsx @@ -10,12 +10,12 @@ import { rejectFollowRequest, biteAccount, } from 'pl-fe/actions/accounts'; -import { useFollow } from 'pl-fe/api/hooks/accounts/useFollow'; +import { useFollow } from 'pl-fe/api/hooks/accounts/use-follow'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import { useModalsStore } from 'pl-fe/stores/modals'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/ui/components/compose-button.tsx b/packages/pl-fe/src/features/ui/components/compose-button.tsx index fe39835d20..5b7af3e868 100644 --- a/packages/pl-fe/src/features/ui/components/compose-button.tsx +++ b/packages/pl-fe/src/features/ui/components/compose-button.tsx @@ -3,11 +3,11 @@ import { FormattedMessage } from 'react-intl'; import { useLocation, useRouteMatch } from 'react-router-dom'; import { groupComposeModal } from 'pl-fe/actions/compose'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; import Avatar from 'pl-fe/components/ui/avatar'; import Button from 'pl-fe/components/ui/button'; import HStack from 'pl-fe/components/ui/hstack'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; const ComposeButton = () => { diff --git a/packages/pl-fe/src/features/ui/components/link-footer.tsx b/packages/pl-fe/src/features/ui/components/link-footer.tsx index f10ce296ac..86ad872222 100644 --- a/packages/pl-fe/src/features/ui/components/link-footer.tsx +++ b/packages/pl-fe/src/features/ui/components/link-footer.tsx @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl'; import Text from 'pl-fe/components/ui/text'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import sourceCode from 'pl-fe/utils/code'; const LinkFooter: React.FC = (): JSX.Element => { diff --git a/packages/pl-fe/src/features/ui/components/modal-root.tsx b/packages/pl-fe/src/features/ui/components/modal-root.tsx index e3c49d17b5..95e8929545 100644 --- a/packages/pl-fe/src/features/ui/components/modal-root.tsx +++ b/packages/pl-fe/src/features/ui/components/modal-root.tsx @@ -3,7 +3,7 @@ import React, { Suspense, lazy } from 'react'; import { cancelReplyCompose } from 'pl-fe/actions/compose'; import { cancelEventCompose } from 'pl-fe/actions/events'; import Base from 'pl-fe/components/modal-root'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { useModalsStore } from 'pl-fe/stores/modals'; import ModalLoading from './modal-loading'; diff --git a/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/index.tsx index 13a33ea0d1..76749f5cce 100644 --- a/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/index.tsx @@ -4,9 +4,9 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { setBadges as saveBadges } from 'pl-fe/actions/admin'; import { deactivateUserModal, deleteUserModal } from 'pl-fe/actions/moderation'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; -import { useSuggest } from 'pl-fe/api/hooks/admin/useSuggest'; -import { useVerify } from 'pl-fe/api/hooks/admin/useVerify'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; +import { useSuggest } from 'pl-fe/api/hooks/admin/use-suggest'; +import { useVerify } from 'pl-fe/api/hooks/admin/use-verify'; import Account from 'pl-fe/components/account'; import List, { ListItem } from 'pl-fe/components/list'; import MissingIndicator from 'pl-fe/components/missing-indicator'; @@ -17,9 +17,9 @@ import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import toast from 'pl-fe/toast'; import { getBadges } from 'pl-fe/utils/badges'; diff --git a/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/staff-role-picker.tsx b/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/staff-role-picker.tsx index ea15a97222..181315860a 100644 --- a/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/staff-role-picker.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/account-moderation-modal/staff-role-picker.tsx @@ -3,7 +3,7 @@ import { defineMessages, MessageDescriptor, useIntl } from 'react-intl'; import { setRole } from 'pl-fe/actions/admin'; import { SelectDropdown } from 'pl-fe/features/forms'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import toast from 'pl-fe/toast'; import type { Account as AccountEntity } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/modals/birthdays-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/birthdays-modal.tsx index ad3230cd44..25383ca16d 100644 --- a/packages/pl-fe/src/features/ui/components/modals/birthdays-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/birthdays-modal.tsx @@ -5,7 +5,7 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import Account from 'pl-fe/features/birthdays/account'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/boost-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/boost-modal.tsx index 48fa0e000e..fac3b19827 100644 --- a/packages/pl-fe/src/features/ui/components/modals/boost-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/boost-modal.tsx @@ -6,7 +6,7 @@ import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import ReplyIndicator from 'pl-fe/features/compose/components/reply-indicator'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/compare-history-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/compare-history-modal.tsx index 531154bd9c..8eee63028f 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compare-history-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compare-history-modal.tsx @@ -10,8 +10,8 @@ import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx index 2f3ff150a2..34798bed55 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/index.tsx @@ -28,8 +28,8 @@ import Toggle from 'pl-fe/components/ui/toggle'; import AccountContainer from 'pl-fe/containers/account-container'; import { isCurrentOrFutureDate } from 'pl-fe/features/compose/components/schedule-form'; import { ComposeEditor, DatePicker } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { useModalsStore } from 'pl-fe/stores/modals'; import UploadButton from './upload-button'; diff --git a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/upload-button.tsx b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/upload-button.tsx index 9d8aea3d52..7b696e9be6 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/upload-button.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compose-event-modal/upload-button.tsx @@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl'; import Icon from 'pl-fe/components/icon'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; interface IUploadButton { disabled?: boolean; diff --git a/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx index 6248b4bb51..eb43523fcf 100644 --- a/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/compose-modal.tsx @@ -6,9 +6,9 @@ import { cancelReplyCompose, uploadCompose } from 'pl-fe/actions/compose'; import { saveDraftStatus } from 'pl-fe/actions/draft-statuses'; import { checkComposeContent } from 'pl-fe/components/modal-root'; import Modal from 'pl-fe/components/ui/modal'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; import { useModalsStore } from 'pl-fe/stores/modals'; import ComposeForm from '../../../compose/components/compose-form'; diff --git a/packages/pl-fe/src/features/ui/components/modals/dislikes-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/dislikes-modal.tsx index e6ff952e80..7c3809c246 100644 --- a/packages/pl-fe/src/features/ui/components/modals/dislikes-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/dislikes-modal.tsx @@ -6,8 +6,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/edit-announcement-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/edit-announcement-modal.tsx index 9d1efe8d10..9e7a9b526e 100644 --- a/packages/pl-fe/src/features/ui/components/modals/edit-announcement-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/edit-announcement-modal.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useAnnouncements } from 'pl-fe/api/hooks/admin/useAnnouncements'; +import { useAnnouncements } from 'pl-fe/api/hooks/admin/use-announcements'; import Form from 'pl-fe/components/ui/form'; import FormGroup from 'pl-fe/components/ui/form-group'; import HStack from 'pl-fe/components/ui/hstack'; diff --git a/packages/pl-fe/src/features/ui/components/modals/edit-bookmark-folder-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/edit-bookmark-folder-modal.tsx index 0b28edd059..20843a303d 100644 --- a/packages/pl-fe/src/features/ui/components/modals/edit-bookmark-folder-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/edit-bookmark-folder-modal.tsx @@ -3,8 +3,8 @@ import React, { useState } from 'react'; import { createPortal } from 'react-dom'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useBookmarkFolder } from 'pl-fe/api/hooks/statuses/useBookmarkFolder'; -import { useUpdateBookmarkFolder } from 'pl-fe/api/hooks/statuses/useUpdateBookmarkFolder'; +import { useBookmarkFolder } from 'pl-fe/api/hooks/statuses/use-bookmark-folder'; +import { useUpdateBookmarkFolder } from 'pl-fe/api/hooks/statuses/use-update-bookmark-folder'; import Emoji from 'pl-fe/components/ui/emoji'; import HStack from 'pl-fe/components/ui/hstack'; import Icon from 'pl-fe/components/ui/icon'; @@ -12,8 +12,8 @@ import Input from 'pl-fe/components/ui/input'; import Modal from 'pl-fe/components/ui/modal'; import EmojiPickerDropdown from 'pl-fe/features/emoji/components/emoji-picker-dropdown'; import { messages as emojiMessages } from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; -import { useTextField } from 'pl-fe/hooks/forms/useTextField'; -import { useClickOutside } from 'pl-fe/hooks/useClickOutside'; +import { useTextField } from 'pl-fe/hooks/forms/use-text-field'; +import { useClickOutside } from 'pl-fe/hooks/use-click-outside'; import toast from 'pl-fe/toast'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/edit-domain-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/edit-domain-modal.tsx index c92e847264..91e1b462d0 100644 --- a/packages/pl-fe/src/features/ui/components/modals/edit-domain-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/edit-domain-modal.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useDomains } from 'pl-fe/api/hooks/admin/useDomains'; +import { useDomains } from 'pl-fe/api/hooks/admin/use-domains'; import Form from 'pl-fe/components/ui/form'; import FormGroup from 'pl-fe/components/ui/form-group'; import HStack from 'pl-fe/components/ui/hstack'; diff --git a/packages/pl-fe/src/features/ui/components/modals/edit-federation-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/edit-federation-modal.tsx index fa3ef26834..13127c4752 100644 --- a/packages/pl-fe/src/features/ui/components/modals/edit-federation-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/edit-federation-modal.tsx @@ -5,8 +5,8 @@ import { updateMrf } from 'pl-fe/actions/mrf'; import List, { ListItem } from 'pl-fe/components/list'; import Modal from 'pl-fe/components/ui/modal'; import Toggle from 'pl-fe/components/ui/toggle'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetRemoteInstance } from 'pl-fe/selectors'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/ui/components/modals/edit-rule-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/edit-rule-modal.tsx index b91cf5f80c..59bccf6fba 100644 --- a/packages/pl-fe/src/features/ui/components/modals/edit-rule-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/edit-rule-modal.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; -import { useRules } from 'pl-fe/api/hooks/admin/useRules'; +import { useRules } from 'pl-fe/api/hooks/admin/use-rules'; import Form from 'pl-fe/components/ui/form'; import FormGroup from 'pl-fe/components/ui/form-group'; import Input from 'pl-fe/components/ui/input'; import Modal from 'pl-fe/components/ui/modal'; -import { useTextField } from 'pl-fe/hooks/forms/useTextField'; +import { useTextField } from 'pl-fe/hooks/forms/use-text-field'; import toast from 'pl-fe/toast'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/event-map-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/event-map-modal.tsx index f7fe312379..740cac5b44 100644 --- a/packages/pl-fe/src/features/ui/components/modals/event-map-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/event-map-modal.tsx @@ -5,8 +5,8 @@ import { FormattedMessage } from 'react-intl'; import Button from 'pl-fe/components/ui/button'; import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { makeGetStatus } from 'pl-fe/selectors'; import 'leaflet/dist/leaflet.css'; diff --git a/packages/pl-fe/src/features/ui/components/modals/event-participants-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/event-participants-modal.tsx index dfa1f7bda0..3389461ac4 100644 --- a/packages/pl-fe/src/features/ui/components/modals/event-participants-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/event-participants-modal.tsx @@ -6,8 +6,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/familiar-followers-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/familiar-followers-modal.tsx index 4c52718391..ba5fd0aadf 100644 --- a/packages/pl-fe/src/features/ui/components/modals/familiar-followers-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/familiar-followers-modal.tsx @@ -7,7 +7,7 @@ import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetAccount } from 'pl-fe/selectors'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/favourites-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/favourites-modal.tsx index 426a97d6cf..ad33c3e0b8 100644 --- a/packages/pl-fe/src/features/ui/components/modals/favourites-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/favourites-modal.tsx @@ -6,8 +6,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/hotkeys-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/hotkeys-modal.tsx index d1a9d673d1..3df283de38 100644 --- a/packages/pl-fe/src/features/ui/components/modals/hotkeys-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/hotkeys-modal.tsx @@ -3,8 +3,8 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import Modal from 'pl-fe/components/ui/modal'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/join-event-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/join-event-modal.tsx index 08ea76a301..6496332e4f 100644 --- a/packages/pl-fe/src/features/ui/components/modals/join-event-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/join-event-modal.tsx @@ -5,7 +5,7 @@ import { joinEvent } from 'pl-fe/actions/events'; import FormGroup from 'pl-fe/components/ui/form-group'; import Modal from 'pl-fe/components/ui/modal'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/components/list.tsx b/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/components/list.tsx index 7485f9b4c4..a16ea838ba 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/components/list.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/components/list.tsx @@ -4,8 +4,8 @@ import { defineMessages, useIntl } from 'react-intl'; import { removeFromListAdder, addToListAdder } from 'pl-fe/actions/lists'; import Icon from 'pl-fe/components/icon'; import IconButton from 'pl-fe/components/icon-button'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' }, diff --git a/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/index.tsx index 5ab0e04f42..1e37e07d38 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-adder-modal/index.tsx @@ -7,8 +7,8 @@ import Modal from 'pl-fe/components/ui/modal'; import AccountContainer from 'pl-fe/containers/account-container'; import { getOrderedLists } from 'pl-fe/features/lists'; import NewListForm from 'pl-fe/features/lists/components/new-list-form'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import List from './components/list'; diff --git a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/account.tsx b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/account.tsx index f30e561dc2..0c028e7d66 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/account.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/account.tsx @@ -5,8 +5,8 @@ import { removeFromListEditor, addToListEditor } from 'pl-fe/actions/lists'; import IconButton from 'pl-fe/components/icon-button'; import HStack from 'pl-fe/components/ui/hstack'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' }, diff --git a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/edit-list-form.tsx b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/edit-list-form.tsx index 69dc70d89f..b934739507 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/edit-list-form.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/edit-list-form.tsx @@ -6,8 +6,8 @@ import Button from 'pl-fe/components/ui/button'; import Form from 'pl-fe/components/ui/form'; import HStack from 'pl-fe/components/ui/hstack'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ title: { id: 'lists.edit.submit', defaultMessage: 'Change title' }, diff --git a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/search.tsx b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/search.tsx index e7578b63de..ae696766e8 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/search.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/components/search.tsx @@ -8,8 +8,8 @@ import Button from 'pl-fe/components/ui/button'; import Form from 'pl-fe/components/ui/form'; import HStack from 'pl-fe/components/ui/hstack'; import Input from 'pl-fe/components/ui/input'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ search: { id: 'lists.search', defaultMessage: 'Search among people you follow' }, diff --git a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/index.tsx index 84315ad02c..1e79a4a4b5 100644 --- a/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/list-editor-modal/index.tsx @@ -4,8 +4,8 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { setupListEditor, resetListEditor } from 'pl-fe/actions/lists'; import { CardHeader, CardTitle } from 'pl-fe/components/ui/card'; import Modal from 'pl-fe/components/ui/modal'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import Account from './components/account'; import EditListForm from './components/edit-list-form'; diff --git a/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/index.tsx index c5b4abfdf8..67110fbc52 100644 --- a/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/index.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import * as v from 'valibot'; -import { useCreateGroup } from 'pl-fe/api/hooks/groups/useCreateGroup'; +import { useCreateGroup } from 'pl-fe/api/hooks/groups/use-create-group'; import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/steps/details-step.tsx b/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/steps/details-step.tsx index 5073a1145a..e269632abc 100644 --- a/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/steps/details-step.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/manage-group-modal/steps/details-step.tsx @@ -7,9 +7,9 @@ import Input from 'pl-fe/components/ui/input'; import Textarea from 'pl-fe/components/ui/textarea'; import AvatarPicker from 'pl-fe/features/edit-profile/components/avatar-picker'; import HeaderPicker from 'pl-fe/features/edit-profile/components/header-picker'; -import { usePreview } from 'pl-fe/hooks/forms/usePreview'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { usePreview } from 'pl-fe/hooks/forms/use-preview'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import resizeImage from 'pl-fe/utils/resize-image'; import type { CreateGroupParams } from 'pl-api'; diff --git a/packages/pl-fe/src/features/ui/components/modals/media-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/media-modal.tsx index d30bd0298e..c9cbb026d4 100644 --- a/packages/pl-fe/src/features/ui/components/modals/media-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/media-modal.tsx @@ -16,8 +16,8 @@ import Audio from 'pl-fe/features/audio'; import PlaceholderStatus from 'pl-fe/features/placeholder/components/placeholder-status'; import Thread from 'pl-fe/features/status/components/thread'; import Video from 'pl-fe/features/video'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { userTouching } from 'pl-fe/is-mobile'; import { makeGetStatus } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/ui/components/modals/mentions-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/mentions-modal.tsx index 727029ff54..3285a18884 100644 --- a/packages/pl-fe/src/features/ui/components/modals/mentions-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/mentions-modal.tsx @@ -7,8 +7,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/mute-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/mute-modal.tsx index 2f0d3f11af..35d29b4c6b 100644 --- a/packages/pl-fe/src/features/ui/components/modals/mute-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/mute-modal.tsx @@ -3,16 +3,16 @@ import { FormattedMessage } from 'react-intl'; import { muteAccount } from 'pl-fe/actions/accounts'; import { toggleHideNotifications, changeMuteDuration } from 'pl-fe/actions/mutes'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import HStack from 'pl-fe/components/ui/hstack'; import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; import DurationSelector from 'pl-fe/features/compose/components/polls/duration-selector'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/reactions-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/reactions-modal.tsx index 01983faa72..b2ddd8702d 100644 --- a/packages/pl-fe/src/features/ui/components/modals/reactions-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/reactions-modal.tsx @@ -10,8 +10,8 @@ import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import Tabs from 'pl-fe/components/ui/tabs'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; import type { Item } from 'pl-fe/components/ui/tabs'; diff --git a/packages/pl-fe/src/features/ui/components/modals/reblogs-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/reblogs-modal.tsx index d655d7c632..cd2ac31b67 100644 --- a/packages/pl-fe/src/features/ui/components/modals/reblogs-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/reblogs-modal.tsx @@ -7,8 +7,8 @@ import ScrollableList from 'pl-fe/components/scrollable-list'; import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/reply-mentions-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/reply-mentions-modal.tsx index d6d54751c3..145df112ba 100644 --- a/packages/pl-fe/src/features/ui/components/modals/reply-mentions-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/reply-mentions-modal.tsx @@ -3,9 +3,9 @@ import { FormattedMessage } from 'react-intl'; import Modal from 'pl-fe/components/ui/modal'; import Account from 'pl-fe/features/reply-mentions/account'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useCompose } from 'pl-fe/hooks/useCompose'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useCompose } from 'pl-fe/hooks/use-compose'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { statusToMentionsAccountIdsArray } from 'pl-fe/reducers/compose'; import { makeGetStatus } from 'pl-fe/selectors'; diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/components/status-check-box.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/components/status-check-box.tsx index d2099c5f32..588213f29e 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/components/status-check-box.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/components/status-check-box.tsx @@ -5,7 +5,7 @@ import StatusContent from 'pl-fe/components/status-content'; import Stack from 'pl-fe/components/ui/stack'; import Toggle from 'pl-fe/components/ui/toggle'; import { MediaGallery, Video, Audio } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; interface IStatusCheckBox { id: string; diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx index 5c94dda63f..926f0c05ea 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx @@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { blockAccount } from 'pl-fe/actions/accounts'; import { submitReport, submitReportSuccess, submitReportFail, ReportableEntities } from 'pl-fe/actions/reports'; import { fetchAccountTimeline } from 'pl-fe/actions/timelines'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import AttachmentThumbs from 'pl-fe/components/attachment-thumbs'; import StatusContent from 'pl-fe/components/status-content'; import Modal from 'pl-fe/components/ui/modal'; @@ -12,9 +12,9 @@ import ProgressBar from 'pl-fe/components/ui/progress-bar'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import AccountContainer from 'pl-fe/containers/account-container'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import ConfirmationStep from './steps/confirmation-step'; import OtherActionsStep from './steps/other-actions-step'; diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/confirmation-step.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/confirmation-step.tsx index c91ffa01b1..3d4f8b9cf1 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/confirmation-step.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/confirmation-step.tsx @@ -4,7 +4,7 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { getPlFeConfig } from 'pl-fe/actions/pl-fe'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; const messages = defineMessages({ accountEntity: { id: 'report.confirmation.entity.account', defaultMessage: 'account' }, diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/other-actions-step.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/other-actions-step.tsx index 0b425b891d..7cc3131c57 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/other-actions-step.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/other-actions-step.tsx @@ -9,8 +9,8 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Toggle from 'pl-fe/components/ui/toggle'; import StatusCheckBox from 'pl-fe/features/ui/components/modals/report-modal/components/status-check-box'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { getDomain } from 'pl-fe/utils/accounts'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/reason-step.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/reason-step.tsx index ec6c38c613..fd4b9ac86f 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/reason-step.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/steps/reason-step.tsx @@ -6,7 +6,7 @@ import FormGroup from 'pl-fe/components/ui/form-group'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Textarea from 'pl-fe/components/ui/textarea'; -import { useInstance } from 'pl-fe/hooks/useInstance'; +import { useInstance } from 'pl-fe/hooks/use-instance'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/modals/select-bookmark-folder-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/select-bookmark-folder-modal.tsx index 02d6e61a44..93b34c39e2 100644 --- a/packages/pl-fe/src/features/ui/components/modals/select-bookmark-folder-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/select-bookmark-folder-modal.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react'; import { FormattedMessage } from 'react-intl'; import { bookmark } from 'pl-fe/actions/interactions'; -import { useBookmarkFolders } from 'pl-fe/api/hooks/statuses/useBookmarkFolders'; +import { useBookmarkFolders } from 'pl-fe/api/hooks/statuses/use-bookmark-folders'; import { RadioGroup, RadioItem } from 'pl-fe/components/radio'; import Emoji from 'pl-fe/components/ui/emoji'; import HStack from 'pl-fe/components/ui/hstack'; @@ -11,8 +11,8 @@ import Modal from 'pl-fe/components/ui/modal'; import Spinner from 'pl-fe/components/ui/spinner'; import Stack from 'pl-fe/components/ui/stack'; import NewFolderForm from 'pl-fe/features/bookmark-folders/components/new-folder-form'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/modals/unauthorized-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/unauthorized-modal.tsx index cafdec04e7..2fb49f9390 100644 --- a/packages/pl-fe/src/features/ui/components/modals/unauthorized-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/unauthorized-modal.tsx @@ -9,11 +9,11 @@ import Input from 'pl-fe/components/ui/input'; import Modal from 'pl-fe/components/ui/modal'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useRegistrationStatus } from 'pl-fe/hooks/use-registration-status'; import { selectAccount } from 'pl-fe/selectors'; import toast from 'pl-fe/toast'; diff --git a/packages/pl-fe/src/features/ui/components/modals/video-modal.tsx b/packages/pl-fe/src/features/ui/components/modals/video-modal.tsx index ba77562011..86816d1d1e 100644 --- a/packages/pl-fe/src/features/ui/components/modals/video-modal.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/video-modal.tsx @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; import Video from 'pl-fe/features/video'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatus } from 'pl-fe/selectors'; import type { BaseModalProps } from '../modal-root'; diff --git a/packages/pl-fe/src/features/ui/components/panels/account-note-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/account-note-panel.tsx index 109c97e04c..d0072fa3fe 100644 --- a/packages/pl-fe/src/features/ui/components/panels/account-note-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/account-note-panel.tsx @@ -7,8 +7,8 @@ import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; import Textarea from 'pl-fe/components/ui/textarea'; import Widget from 'pl-fe/components/ui/widget'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { Account as AccountEntity } from 'pl-fe/normalizers/account'; import type { AppDispatch } from 'pl-fe/store'; diff --git a/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx index e9fa5d6c92..d7b97faf43 100644 --- a/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/group-media-panel.tsx @@ -6,8 +6,8 @@ import { fetchGroupTimeline } from 'pl-fe/actions/timelines'; import Spinner from 'pl-fe/components/ui/spinner'; import Text from 'pl-fe/components/ui/text'; import Widget from 'pl-fe/components/ui/widget'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { type AccountGalleryAttachment, getGroupGallery } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/ui/components/panels/instance-info-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/instance-info-panel.tsx index 63657ebc73..3273c4fe7c 100644 --- a/packages/pl-fe/src/features/ui/components/panels/instance-info-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/instance-info-panel.tsx @@ -3,9 +3,9 @@ import { useIntl, defineMessages } from 'react-intl'; import { pinHost, unpinHost } from 'pl-fe/actions/remote-timeline'; import Widget from 'pl-fe/components/ui/widget'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { makeGetRemoteInstance } from 'pl-fe/selectors'; const getRemoteInstance = makeGetRemoteInstance(); diff --git a/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx index 1713c19aff..f85a0a9b16 100644 --- a/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/instance-moderation-panel.tsx @@ -4,8 +4,8 @@ import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import Widget from 'pl-fe/components/ui/widget'; import InstanceRestrictions from 'pl-fe/features/federation-restrictions/components/instance-restrictions'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { makeGetRemoteInstance } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/ui/components/panels/my-groups-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/my-groups-panel.tsx index ce2455f168..b937554a79 100644 --- a/packages/pl-fe/src/features/ui/components/panels/my-groups-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/my-groups-panel.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { useGroups } from 'pl-fe/api/hooks/groups/useGroups'; +import { useGroups } from 'pl-fe/api/hooks/groups/use-groups'; import Widget from 'pl-fe/components/ui/widget'; import GroupListItem from 'pl-fe/features/groups/components/discover/group-list-item'; import PlaceholderGroupSearch from 'pl-fe/features/placeholder/components/placeholder-group-search'; diff --git a/packages/pl-fe/src/features/ui/components/panels/pinned-accounts-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/pinned-accounts-panel.tsx index 0ae284fe35..6950fd3f69 100644 --- a/packages/pl-fe/src/features/ui/components/panels/pinned-accounts-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/pinned-accounts-panel.tsx @@ -7,8 +7,8 @@ import Widget from 'pl-fe/components/ui/widget'; import AccountContainer from 'pl-fe/containers/account-container'; import Emojify from 'pl-fe/features/emoji/emojify'; import { WhoToFollowPanel } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx index 65805e1c55..d32473b3d0 100644 --- a/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/profile-info-panel.tsx @@ -11,8 +11,8 @@ import Icon from 'pl-fe/components/ui/icon'; import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { capitalize } from 'pl-fe/utils/strings'; import ProfileFamiliarFollowers from '../profile-familiar-followers'; diff --git a/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx index 865828cf27..c51ecc04e5 100644 --- a/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/profile-media-panel.tsx @@ -6,8 +6,8 @@ import { fetchAccountTimeline } from 'pl-fe/actions/timelines'; import Spinner from 'pl-fe/components/ui/spinner'; import Text from 'pl-fe/components/ui/text'; import Widget from 'pl-fe/components/ui/widget'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { type AccountGalleryAttachment, getAccountGallery } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/ui/components/panels/promo-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/promo-panel.tsx index 26431e027d..5f4647b216 100644 --- a/packages/pl-fe/src/features/ui/components/panels/promo-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/promo-panel.tsx @@ -4,9 +4,9 @@ import ForkAwesomeIcon from 'pl-fe/components/fork-awesome-icon'; import List, { ListItem } from 'pl-fe/components/list'; import HStack from 'pl-fe/components/ui/hstack'; import Widget from 'pl-fe/components/ui/widget'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; +import { useSettings } from 'pl-fe/hooks/use-settings'; const PromoPanel: React.FC = () => { const instance = useInstance(); diff --git a/packages/pl-fe/src/features/ui/components/panels/sign-up-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/sign-up-panel.tsx index 06a6d7c492..201f3f4d78 100644 --- a/packages/pl-fe/src/features/ui/components/panels/sign-up-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/sign-up-panel.tsx @@ -10,10 +10,10 @@ import Text from 'pl-fe/components/ui/text'; import LoginForm from 'pl-fe/features/auth-login/components/login-form'; import OtpAuthForm from 'pl-fe/features/auth-login/components/otp-auth-form'; import ExternalLoginForm from 'pl-fe/features/external-login/components/external-login-form'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useRegistrationStatus } from 'pl-fe/hooks/use-registration-status'; import { getRedirectUrl } from 'pl-fe/utils/redirect'; import { isStandalone } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/features/ui/components/panels/trends-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/trends-panel.tsx index 09552fb9a0..0906021359 100644 --- a/packages/pl-fe/src/features/ui/components/panels/trends-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/trends-panel.tsx @@ -7,7 +7,7 @@ import Hashtag from 'pl-fe/components/hashtag'; import Text from 'pl-fe/components/ui/text'; import Widget from 'pl-fe/components/ui/widget'; import PlaceholderSidebarTrends from 'pl-fe/features/placeholder/components/placeholder-sidebar-trends'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; import useTrends from 'pl-fe/queries/trends'; interface ITrendsPanel { diff --git a/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx index 27a30185cc..bc5cb8e5c7 100644 --- a/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/user-panel.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import { useAccount } from 'pl-fe/api/hooks/accounts/useAccount'; +import { useAccount } from 'pl-fe/api/hooks/accounts/use-account'; import StillImage from 'pl-fe/components/still-image'; import Avatar from 'pl-fe/components/ui/avatar'; import HStack from 'pl-fe/components/ui/hstack'; @@ -10,8 +10,8 @@ import Stack from 'pl-fe/components/ui/stack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { getAcct } from 'pl-fe/utils/accounts'; import { shortNumberFormat } from 'pl-fe/utils/numbers'; import { displayFqn } from 'pl-fe/utils/state'; diff --git a/packages/pl-fe/src/features/ui/components/panels/who-to-follow-panel.tsx b/packages/pl-fe/src/features/ui/components/panels/who-to-follow-panel.tsx index 965c6dd8d7..644ee5e2f4 100644 --- a/packages/pl-fe/src/features/ui/components/panels/who-to-follow-panel.tsx +++ b/packages/pl-fe/src/features/ui/components/panels/who-to-follow-panel.tsx @@ -6,7 +6,7 @@ import Text from 'pl-fe/components/ui/text'; import Widget from 'pl-fe/components/ui/widget'; import AccountContainer from 'pl-fe/containers/account-container'; import PlaceholderSidebarSuggestions from 'pl-fe/features/placeholder/components/placeholder-sidebar-suggestions'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { useDismissSuggestion, useSuggestions } from 'pl-fe/queries/suggestions'; import type { Account as AccountEntity } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/pending-status.tsx b/packages/pl-fe/src/features/ui/components/pending-status.tsx index 11ad0d6efb..44c56f4b68 100644 --- a/packages/pl-fe/src/features/ui/components/pending-status.tsx +++ b/packages/pl-fe/src/features/ui/components/pending-status.tsx @@ -10,7 +10,7 @@ import Stack from 'pl-fe/components/ui/stack'; import PlaceholderCard from 'pl-fe/features/placeholder/components/placeholder-card'; import PlaceholderMediaGallery from 'pl-fe/features/placeholder/components/placeholder-media-gallery'; import QuotedStatus from 'pl-fe/features/status/containers/quoted-status-container'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { buildStatus } from '../util/pending-status-builder'; diff --git a/packages/pl-fe/src/features/ui/components/profile-dropdown.tsx b/packages/pl-fe/src/features/ui/components/profile-dropdown.tsx index babad5af88..10b5247e2d 100644 --- a/packages/pl-fe/src/features/ui/components/profile-dropdown.tsx +++ b/packages/pl-fe/src/features/ui/components/profile-dropdown.tsx @@ -9,9 +9,9 @@ import { fetchOwnAccounts, logOut, switchAccount } from 'pl-fe/actions/auth'; import Account from 'pl-fe/components/account'; import DropdownMenu from 'pl-fe/components/dropdown-menu'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { RootState } from 'pl-fe/store'; import ThemeToggle from './theme-toggle'; diff --git a/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx b/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx index fe3db1fed4..10c11e8342 100644 --- a/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx +++ b/packages/pl-fe/src/features/ui/components/profile-familiar-followers.tsx @@ -10,9 +10,9 @@ import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; import VerificationBadge from 'pl-fe/components/verification-badge'; import Emojify from 'pl-fe/features/emoji/emojify'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { makeGetAccount } from 'pl-fe/selectors'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/features/ui/components/profile-stats.tsx b/packages/pl-fe/src/features/ui/components/profile-stats.tsx index 66a37e62bb..dbb7169d4e 100644 --- a/packages/pl-fe/src/features/ui/components/profile-stats.tsx +++ b/packages/pl-fe/src/features/ui/components/profile-stats.tsx @@ -4,7 +4,7 @@ import { NavLink } from 'react-router-dom'; import HStack from 'pl-fe/components/ui/hstack'; import Text from 'pl-fe/components/ui/text'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import { shortNumberFormat } from 'pl-fe/utils/numbers'; import type { Account } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/subscription-button.tsx b/packages/pl-fe/src/features/ui/components/subscription-button.tsx index 2acc41f382..570c002e8d 100644 --- a/packages/pl-fe/src/features/ui/components/subscription-button.tsx +++ b/packages/pl-fe/src/features/ui/components/subscription-button.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { useFollow } from 'pl-fe/api/hooks/accounts/useFollow'; +import { useFollow } from 'pl-fe/api/hooks/accounts/use-follow'; import IconButton from 'pl-fe/components/ui/icon-button'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import toast from 'pl-fe/toast'; import type { Account as AccountEntity } from 'pl-fe/normalizers/account'; diff --git a/packages/pl-fe/src/features/ui/components/theme-toggle.tsx b/packages/pl-fe/src/features/ui/components/theme-toggle.tsx index 5770680174..991b7fb25b 100644 --- a/packages/pl-fe/src/features/ui/components/theme-toggle.tsx +++ b/packages/pl-fe/src/features/ui/components/theme-toggle.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { changeSetting } from 'pl-fe/actions/settings'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import ThemeSelector from './theme-selector'; diff --git a/packages/pl-fe/src/features/ui/components/timeline.tsx b/packages/pl-fe/src/features/ui/components/timeline.tsx index cd9e00bfcb..ca5195bcd8 100644 --- a/packages/pl-fe/src/features/ui/components/timeline.tsx +++ b/packages/pl-fe/src/features/ui/components/timeline.tsx @@ -6,8 +6,8 @@ import { dequeueTimeline, scrollTopTimeline } from 'pl-fe/actions/timelines'; import ScrollTopButton from 'pl-fe/components/scroll-top-button'; import StatusList, { IStatusList } from 'pl-fe/components/status-list'; import Portal from 'pl-fe/components/ui/portal'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; import { makeGetStatusIds } from 'pl-fe/selectors'; const messages = defineMessages({ diff --git a/packages/pl-fe/src/features/ui/index.tsx b/packages/pl-fe/src/features/ui/index.tsx index 4f4ad87ca3..02b1e0d547 100644 --- a/packages/pl-fe/src/features/ui/index.tsx +++ b/packages/pl-fe/src/features/ui/index.tsx @@ -13,18 +13,18 @@ import { register as registerPushNotifications } from 'pl-fe/actions/push-notifi import { fetchScheduledStatuses } from 'pl-fe/actions/scheduled-statuses'; import { fetchSuggestionsForTimeline } from 'pl-fe/actions/suggestions'; import { fetchHomeTimeline } from 'pl-fe/actions/timelines'; -import { useUserStream } from 'pl-fe/api/hooks/streaming/useUserStream'; +import { useUserStream } from 'pl-fe/api/hooks/streaming/use-user-stream'; import SidebarNavigation from 'pl-fe/components/sidebar-navigation'; import ThumbNavigation from 'pl-fe/components/thumb-navigation'; import Layout from 'pl-fe/components/ui/layout'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useInstance } from 'pl-fe/hooks/useInstance'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useInstance } from 'pl-fe/hooks/use-instance'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import AdminLayout from 'pl-fe/layouts/admin-layout'; import ChatsLayout from 'pl-fe/layouts/chats-layout'; import DefaultLayout from 'pl-fe/layouts/default-layout'; diff --git a/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx b/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx index 69040d7617..1efa9198a1 100644 --- a/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx +++ b/packages/pl-fe/src/features/ui/util/global-hotkeys.tsx @@ -3,8 +3,8 @@ import { useHistory } from 'react-router-dom'; import { resetCompose } from 'pl-fe/actions/compose'; import { FOCUS_EDITOR_COMMAND } from 'pl-fe/features/compose/editor/plugins/focus-plugin'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { useModalsStore } from 'pl-fe/stores/modals'; import { HotKeys } from '../components/hotkeys'; diff --git a/packages/pl-fe/src/features/ui/util/optional-motion.tsx b/packages/pl-fe/src/features/ui/util/optional-motion.tsx index d75946b309..cea6118352 100644 --- a/packages/pl-fe/src/features/ui/util/optional-motion.tsx +++ b/packages/pl-fe/src/features/ui/util/optional-motion.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Motion, MotionProps } from 'react-motion'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import ReducedMotion from './reduced-motion'; diff --git a/packages/pl-fe/src/features/ui/util/react-router-helpers.tsx b/packages/pl-fe/src/features/ui/util/react-router-helpers.tsx index cfc430eace..d0c06745a0 100644 --- a/packages/pl-fe/src/features/ui/util/react-router-helpers.tsx +++ b/packages/pl-fe/src/features/ui/util/react-router-helpers.tsx @@ -3,8 +3,8 @@ import { ErrorBoundary, type FallbackProps } from 'react-error-boundary'; import { Redirect, Route, useHistory, RouteProps, RouteComponentProps, match as MatchType, useLocation } from 'react-router-dom'; import Layout from 'pl-fe/components/ui/layout'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { useSettings } from 'pl-fe/hooks/useSettings'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { useSettings } from 'pl-fe/hooks/use-settings'; import ColumnForbidden from '../components/column-forbidden'; import ColumnLoading from '../components/column-loading'; diff --git a/packages/pl-fe/src/hooks/forms/useImageField.ts b/packages/pl-fe/src/hooks/forms/use-image-field.ts similarity index 95% rename from packages/pl-fe/src/hooks/forms/useImageField.ts rename to packages/pl-fe/src/hooks/forms/use-image-field.ts index ff3e54159d..f622f33ded 100644 --- a/packages/pl-fe/src/hooks/forms/useImageField.ts +++ b/packages/pl-fe/src/hooks/forms/use-image-field.ts @@ -2,7 +2,7 @@ import { useState } from 'react'; import resizeImage from 'pl-fe/utils/resize-image'; -import { usePreview } from './usePreview'; +import { usePreview } from './use-preview'; interface UseImageFieldOpts { /** Resize the image to the max dimensions, if defined. */ diff --git a/packages/pl-fe/src/hooks/forms/usePreview.ts b/packages/pl-fe/src/hooks/forms/use-preview.ts similarity index 100% rename from packages/pl-fe/src/hooks/forms/usePreview.ts rename to packages/pl-fe/src/hooks/forms/use-preview.ts diff --git a/packages/pl-fe/src/hooks/forms/useTextField.ts b/packages/pl-fe/src/hooks/forms/use-text-field.ts similarity index 100% rename from packages/pl-fe/src/hooks/forms/useTextField.ts rename to packages/pl-fe/src/hooks/forms/use-text-field.ts diff --git a/packages/pl-fe/src/hooks/useAppDispatch.ts b/packages/pl-fe/src/hooks/use-app-dispatch.ts similarity index 100% rename from packages/pl-fe/src/hooks/useAppDispatch.ts rename to packages/pl-fe/src/hooks/use-app-dispatch.ts diff --git a/packages/pl-fe/src/hooks/useAppSelector.ts b/packages/pl-fe/src/hooks/use-app-selector.ts similarity index 100% rename from packages/pl-fe/src/hooks/useAppSelector.ts rename to packages/pl-fe/src/hooks/use-app-selector.ts diff --git a/packages/pl-fe/src/hooks/use-can-interact.ts b/packages/pl-fe/src/hooks/use-can-interact.ts new file mode 100644 index 0000000000..d3d42e2cac --- /dev/null +++ b/packages/pl-fe/src/hooks/use-can-interact.ts @@ -0,0 +1,32 @@ +import { useAppSelector } from './use-app-selector'; + +import type { InteractionPolicy, InteractionPolicyEntry } from 'pl-api'; +import type { MinifiedStatus } from 'pl-fe/reducers/statuses'; + +const useCanInteract = (status: Pick, type: keyof InteractionPolicy): { + canInteract: boolean; + approvalRequired: boolean | null; + allowed?: Array; +} => { + const interactionPolicy = status.interaction_policy; + + const me = useAppSelector(state => state.me); + + if (me === status.account_id || interactionPolicy[type].always.includes('me')) return { + canInteract: true, + approvalRequired: false, + }; + + if (interactionPolicy[type].with_approval.includes('me')) return { + canInteract: true, + approvalRequired: true, + }; + + return { + canInteract: false, + approvalRequired: null, + allowed: [...interactionPolicy[type].always, ...interactionPolicy[type].with_approval], + }; +}; + +export { useCanInteract }; diff --git a/packages/pl-fe/src/hooks/useClickOutside.ts b/packages/pl-fe/src/hooks/use-click-outside.ts similarity index 100% rename from packages/pl-fe/src/hooks/useClickOutside.ts rename to packages/pl-fe/src/hooks/use-click-outside.ts diff --git a/packages/pl-fe/src/hooks/useClient.ts b/packages/pl-fe/src/hooks/use-client.ts similarity index 68% rename from packages/pl-fe/src/hooks/useClient.ts rename to packages/pl-fe/src/hooks/use-client.ts index e64abb0f08..9b76003786 100644 --- a/packages/pl-fe/src/hooks/useClient.ts +++ b/packages/pl-fe/src/hooks/use-client.ts @@ -1,6 +1,6 @@ import { getClient } from 'pl-fe/api'; -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; const useClient = () => useAppSelector(getClient); diff --git a/packages/pl-fe/src/hooks/useCompose.ts b/packages/pl-fe/src/hooks/use-compose.ts similarity index 87% rename from packages/pl-fe/src/hooks/useCompose.ts rename to packages/pl-fe/src/hooks/use-compose.ts index 41df19eb75..6e3409b170 100644 --- a/packages/pl-fe/src/hooks/useCompose.ts +++ b/packages/pl-fe/src/hooks/use-compose.ts @@ -1,4 +1,4 @@ -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; import type { ReducerCompose } from 'pl-fe/reducers/compose'; diff --git a/packages/pl-fe/src/hooks/useDebounce.ts b/packages/pl-fe/src/hooks/use-debounce.ts similarity index 100% rename from packages/pl-fe/src/hooks/useDebounce.ts rename to packages/pl-fe/src/hooks/use-debounce.ts diff --git a/packages/pl-fe/src/hooks/useDimensions.test.ts b/packages/pl-fe/src/hooks/use-dimensions.test.ts similarity index 96% rename from packages/pl-fe/src/hooks/useDimensions.test.ts rename to packages/pl-fe/src/hooks/use-dimensions.test.ts index 14f8b25879..3ce75e9729 100644 --- a/packages/pl-fe/src/hooks/useDimensions.test.ts +++ b/packages/pl-fe/src/hooks/use-dimensions.test.ts @@ -1,7 +1,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { listener, mockDisconnect } from './__mocks__/resize-observer'; -import { useDimensions } from './useDimensions'; +import { useDimensions } from './use-dimensions'; describe('useDimensions()', () => { beforeEach(() => { diff --git a/packages/pl-fe/src/hooks/useDimensions.ts b/packages/pl-fe/src/hooks/use-dimensions.ts similarity index 100% rename from packages/pl-fe/src/hooks/useDimensions.ts rename to packages/pl-fe/src/hooks/use-dimensions.ts diff --git a/packages/pl-fe/src/hooks/useDraggedFiles.ts b/packages/pl-fe/src/hooks/use-dragged-files.ts similarity index 100% rename from packages/pl-fe/src/hooks/useDraggedFiles.ts rename to packages/pl-fe/src/hooks/use-dragged-files.ts diff --git a/packages/pl-fe/src/hooks/useFeatures.ts b/packages/pl-fe/src/hooks/use-features.ts similarity index 72% rename from packages/pl-fe/src/hooks/useFeatures.ts rename to packages/pl-fe/src/hooks/use-features.ts index 5a1513d314..0b6560f76a 100644 --- a/packages/pl-fe/src/hooks/useFeatures.ts +++ b/packages/pl-fe/src/hooks/use-features.ts @@ -1,7 +1,7 @@ import { Features } from 'pl-api'; -import { useAppSelector } from './useAppSelector'; -import { useInstance } from './useInstance'; +import { useAppSelector } from './use-app-selector'; +import { useInstance } from './use-instance'; /** Get features for the current instance. */ const useFeatures = (): Features => { diff --git a/packages/pl-fe/src/hooks/useGetState.ts b/packages/pl-fe/src/hooks/use-get-state.ts similarity index 85% rename from packages/pl-fe/src/hooks/useGetState.ts rename to packages/pl-fe/src/hooks/use-get-state.ts index c95e59142a..ceb568fc2d 100644 --- a/packages/pl-fe/src/hooks/useGetState.ts +++ b/packages/pl-fe/src/hooks/use-get-state.ts @@ -1,4 +1,4 @@ -import { useAppDispatch } from './useAppDispatch'; +import { useAppDispatch } from './use-app-dispatch'; import type { RootState } from 'pl-fe/store'; diff --git a/packages/pl-fe/src/hooks/useInstance.ts b/packages/pl-fe/src/hooks/use-instance.ts similarity index 73% rename from packages/pl-fe/src/hooks/useInstance.ts rename to packages/pl-fe/src/hooks/use-instance.ts index ee30c64e81..4c94a4ab26 100644 --- a/packages/pl-fe/src/hooks/useInstance.ts +++ b/packages/pl-fe/src/hooks/use-instance.ts @@ -1,4 +1,4 @@ -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; /** Get the Instance for the current backend. */ const useInstance = () => useAppSelector((state) => state.instance); diff --git a/packages/pl-fe/src/hooks/useIsMobile.ts b/packages/pl-fe/src/hooks/use-is-mobile.ts similarity index 66% rename from packages/pl-fe/src/hooks/useIsMobile.ts rename to packages/pl-fe/src/hooks/use-is-mobile.ts index cdef6b9cef..2436954b81 100644 --- a/packages/pl-fe/src/hooks/useIsMobile.ts +++ b/packages/pl-fe/src/hooks/use-is-mobile.ts @@ -1,4 +1,4 @@ -import { useScreenWidth } from './useScreenWidth'; +import { useScreenWidth } from './use-screen-width'; export function useIsMobile() { const screenWidth = useScreenWidth(); diff --git a/packages/pl-fe/src/hooks/useLoading.ts b/packages/pl-fe/src/hooks/use-loading.ts similarity index 100% rename from packages/pl-fe/src/hooks/useLoading.ts rename to packages/pl-fe/src/hooks/use-loading.ts diff --git a/packages/pl-fe/src/hooks/useLocale.ts b/packages/pl-fe/src/hooks/use-locale.ts similarity index 100% rename from packages/pl-fe/src/hooks/useLocale.ts rename to packages/pl-fe/src/hooks/use-locale.ts diff --git a/packages/pl-fe/src/hooks/useLoggedIn.ts b/packages/pl-fe/src/hooks/use-logged-in.ts similarity index 81% rename from packages/pl-fe/src/hooks/useLoggedIn.ts rename to packages/pl-fe/src/hooks/use-logged-in.ts index 40d3693e6b..eed165aa57 100644 --- a/packages/pl-fe/src/hooks/useLoggedIn.ts +++ b/packages/pl-fe/src/hooks/use-logged-in.ts @@ -1,4 +1,4 @@ -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; const useLoggedIn = () => { const me = useAppSelector(state => state.me); diff --git a/packages/pl-fe/src/hooks/useLogo.ts b/packages/pl-fe/src/hooks/use-logo.ts similarity index 73% rename from packages/pl-fe/src/hooks/useLogo.ts rename to packages/pl-fe/src/hooks/use-logo.ts index 7a93755209..ccb9abfd6b 100644 --- a/packages/pl-fe/src/hooks/useLogo.ts +++ b/packages/pl-fe/src/hooks/use-logo.ts @@ -1,6 +1,6 @@ -import { usePlFeConfig } from './usePlFeConfig'; -import { useSettings } from './useSettings'; -import { useTheme } from './useTheme'; +import { usePlFeConfig } from './use-pl-fe-config'; +import { useSettings } from './use-settings'; +import { useTheme } from './use-theme'; const useLogo = () => { const { logo, logoDarkMode } = usePlFeConfig(); diff --git a/packages/pl-fe/src/hooks/useOwnAccount.ts b/packages/pl-fe/src/hooks/use-own-account.ts similarity index 89% rename from packages/pl-fe/src/hooks/useOwnAccount.ts rename to packages/pl-fe/src/hooks/use-own-account.ts index 61a7570793..fd517e8493 100644 --- a/packages/pl-fe/src/hooks/useOwnAccount.ts +++ b/packages/pl-fe/src/hooks/use-own-account.ts @@ -2,7 +2,7 @@ import { useCallback } from 'react'; import { makeGetAccount } from 'pl-fe/selectors'; -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; /** Get the logged-in account from the store, if any. */ const useOwnAccount = () => { diff --git a/packages/pl-fe/src/hooks/usePlFeConfig.ts b/packages/pl-fe/src/hooks/use-pl-fe-config.ts similarity index 83% rename from packages/pl-fe/src/hooks/usePlFeConfig.ts rename to packages/pl-fe/src/hooks/use-pl-fe-config.ts index 7cea5bb1f1..529f4c5148 100644 --- a/packages/pl-fe/src/hooks/usePlFeConfig.ts +++ b/packages/pl-fe/src/hooks/use-pl-fe-config.ts @@ -1,6 +1,6 @@ import { getPlFeConfig } from 'pl-fe/actions/pl-fe'; -import { useAppSelector } from './useAppSelector'; +import { useAppSelector } from './use-app-selector'; import type { PlFeConfig } from 'pl-fe/types/pl-fe'; diff --git a/packages/pl-fe/src/hooks/usePrevious.ts b/packages/pl-fe/src/hooks/use-previous.ts similarity index 100% rename from packages/pl-fe/src/hooks/usePrevious.ts rename to packages/pl-fe/src/hooks/use-previous.ts diff --git a/packages/pl-fe/src/hooks/useRegistrationStatus.ts b/packages/pl-fe/src/hooks/use-registration-status.ts similarity index 74% rename from packages/pl-fe/src/hooks/useRegistrationStatus.ts rename to packages/pl-fe/src/hooks/use-registration-status.ts index 53ffce8547..aa4700e246 100644 --- a/packages/pl-fe/src/hooks/useRegistrationStatus.ts +++ b/packages/pl-fe/src/hooks/use-registration-status.ts @@ -1,5 +1,5 @@ -import { useFeatures } from './useFeatures'; -import { useInstance } from './useInstance'; +import { useFeatures } from './use-features'; +import { useInstance } from './use-instance'; const useRegistrationStatus = () => { const instance = useInstance(); diff --git a/packages/pl-fe/src/hooks/useScreenWidth.ts b/packages/pl-fe/src/hooks/use-screen-width.ts similarity index 100% rename from packages/pl-fe/src/hooks/useScreenWidth.ts rename to packages/pl-fe/src/hooks/use-screen-width.ts diff --git a/packages/pl-fe/src/hooks/useSettings.ts b/packages/pl-fe/src/hooks/use-settings.ts similarity index 100% rename from packages/pl-fe/src/hooks/useSettings.ts rename to packages/pl-fe/src/hooks/use-settings.ts diff --git a/packages/pl-fe/src/hooks/useSystemTheme.ts b/packages/pl-fe/src/hooks/use-system-theme.ts similarity index 100% rename from packages/pl-fe/src/hooks/useSystemTheme.ts rename to packages/pl-fe/src/hooks/use-system-theme.ts diff --git a/packages/pl-fe/src/hooks/useTheme.ts b/packages/pl-fe/src/hooks/use-theme.ts similarity index 79% rename from packages/pl-fe/src/hooks/useTheme.ts rename to packages/pl-fe/src/hooks/use-theme.ts index 8a53cd376b..563425c832 100644 --- a/packages/pl-fe/src/hooks/useTheme.ts +++ b/packages/pl-fe/src/hooks/use-theme.ts @@ -1,5 +1,5 @@ -import { useSettings } from './useSettings'; -import { useSystemTheme } from './useSystemTheme'; +import { useSettings } from './use-settings'; +import { useSystemTheme } from './use-system-theme'; type Theme = 'light' | 'dark' | 'black'; diff --git a/packages/pl-fe/src/init/pl-fe-head.tsx b/packages/pl-fe/src/init/pl-fe-head.tsx index ac32912aa2..5f79f9c146 100644 --- a/packages/pl-fe/src/init/pl-fe-head.tsx +++ b/packages/pl-fe/src/init/pl-fe-head.tsx @@ -1,10 +1,10 @@ import clsx from 'clsx'; import React, { useEffect } from 'react'; -import { useLocale } from 'pl-fe/hooks/useLocale'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; -import { useSettings } from 'pl-fe/hooks/useSettings'; -import { useTheme } from 'pl-fe/hooks/useTheme'; +import { useLocale } from 'pl-fe/hooks/use-locale'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; +import { useSettings } from 'pl-fe/hooks/use-settings'; +import { useTheme } from 'pl-fe/hooks/use-theme'; import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config'; import { startSentry } from 'pl-fe/sentry'; import { useModalsStore } from 'pl-fe/stores/modals'; diff --git a/packages/pl-fe/src/init/pl-fe-load.tsx b/packages/pl-fe/src/init/pl-fe-load.tsx index d1a6bae85d..c5312418a1 100644 --- a/packages/pl-fe/src/init/pl-fe-load.tsx +++ b/packages/pl-fe/src/init/pl-fe-load.tsx @@ -5,10 +5,10 @@ import { fetchInstance } from 'pl-fe/actions/instance'; import { fetchMe } from 'pl-fe/actions/me'; import { loadPlFeConfig } from 'pl-fe/actions/pl-fe'; import LoadingScreen from 'pl-fe/components/loading-screen'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLocale } from 'pl-fe/hooks/useLocale'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLocale } from 'pl-fe/hooks/use-locale'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import MESSAGES from 'pl-fe/messages'; /** Load initial data from the backend */ diff --git a/packages/pl-fe/src/init/pl-fe-mount.tsx b/packages/pl-fe/src/init/pl-fe-mount.tsx index 5f68b2822d..79e9e3a016 100644 --- a/packages/pl-fe/src/init/pl-fe-mount.tsx +++ b/packages/pl-fe/src/init/pl-fe-mount.tsx @@ -9,10 +9,10 @@ import * as BuildConfig from 'pl-fe/build-config'; import LoadingScreen from 'pl-fe/components/loading-screen'; import SiteErrorBoundary from 'pl-fe/components/site-error-boundary'; import { ModalRoot, OnboardingWizard } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { useCachedLocationHandler } from 'pl-fe/utils/redirect'; const GdprBanner = React.lazy(() => import('pl-fe/components/gdpr-banner')); diff --git a/packages/pl-fe/src/layouts/default-layout.tsx b/packages/pl-fe/src/layouts/default-layout.tsx index bac8e553b7..cb7a020298 100644 --- a/packages/pl-fe/src/layouts/default-layout.tsx +++ b/packages/pl-fe/src/layouts/default-layout.tsx @@ -7,8 +7,8 @@ import { TrendsPanel, SignUpPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface IDefaultLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/layouts/event-layout.tsx b/packages/pl-fe/src/layouts/event-layout.tsx index d642ed28fa..e340b7f112 100644 --- a/packages/pl-fe/src/layouts/event-layout.tsx +++ b/packages/pl-fe/src/layouts/event-layout.tsx @@ -14,8 +14,8 @@ import { TrendsPanel, WhoToFollowPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { makeGetStatus } from 'pl-fe/selectors'; const getStatus = makeGetStatus(); diff --git a/packages/pl-fe/src/layouts/events-layout.tsx b/packages/pl-fe/src/layouts/events-layout.tsx index a21c5dd77a..c5f0940b8e 100644 --- a/packages/pl-fe/src/layouts/events-layout.tsx +++ b/packages/pl-fe/src/layouts/events-layout.tsx @@ -7,7 +7,7 @@ import { TrendsPanel, NewEventPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface IEventsLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/layouts/external-login-layout.tsx b/packages/pl-fe/src/layouts/external-login-layout.tsx index 2069581152..1872f2aebf 100644 --- a/packages/pl-fe/src/layouts/external-login-layout.tsx +++ b/packages/pl-fe/src/layouts/external-login-layout.tsx @@ -7,8 +7,8 @@ import { TrendsPanel, SignUpPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; import { isStandalone } from 'pl-fe/utils/state'; interface IExternalLoginLayout { diff --git a/packages/pl-fe/src/layouts/group-layout.tsx b/packages/pl-fe/src/layouts/group-layout.tsx index 55c72d331c..7ca274b87c 100644 --- a/packages/pl-fe/src/layouts/group-layout.tsx +++ b/packages/pl-fe/src/layouts/group-layout.tsx @@ -2,8 +2,8 @@ import React, { useMemo } from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { useRouteMatch } from 'react-router-dom'; -import { useGroup } from 'pl-fe/api/hooks/groups/useGroup'; -import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/useGroupMembershipRequests'; +import { useGroup } from 'pl-fe/api/hooks/groups/use-group'; +import { useGroupMembershipRequests } from 'pl-fe/api/hooks/groups/use-group-membership-requests'; import Column from 'pl-fe/components/ui/column'; import Icon from 'pl-fe/components/ui/icon'; import Layout from 'pl-fe/components/ui/layout'; @@ -16,7 +16,7 @@ import { GroupMediaPanel, SignUpPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; const messages = defineMessages({ all: { id: 'group.tabs.all', defaultMessage: 'All' }, diff --git a/packages/pl-fe/src/layouts/home-layout.tsx b/packages/pl-fe/src/layouts/home-layout.tsx index 8a129abddd..f1f6e0c5f0 100644 --- a/packages/pl-fe/src/layouts/home-layout.tsx +++ b/packages/pl-fe/src/layouts/home-layout.tsx @@ -19,13 +19,13 @@ import { BirthdayPanel, AnnouncementsPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useIsMobile } from 'pl-fe/hooks/useIsMobile'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useDraggedFiles } from 'pl-fe/hooks/use-dragged-files'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useIsMobile } from 'pl-fe/hooks/use-is-mobile'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; interface IHomeLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/layouts/landing-layout.tsx b/packages/pl-fe/src/layouts/landing-layout.tsx index cddcf35088..3a6f4cbdcd 100644 --- a/packages/pl-fe/src/layouts/landing-layout.tsx +++ b/packages/pl-fe/src/layouts/landing-layout.tsx @@ -6,8 +6,8 @@ import { TrendsPanel, SignUpPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface ILandingLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/layouts/profile-layout.tsx b/packages/pl-fe/src/layouts/profile-layout.tsx index eaad0d85d3..3a17157096 100644 --- a/packages/pl-fe/src/layouts/profile-layout.tsx +++ b/packages/pl-fe/src/layouts/profile-layout.tsx @@ -3,7 +3,7 @@ import { Helmet } from 'react-helmet-async'; import { FormattedMessage } from 'react-intl'; import { Redirect, useHistory } from 'react-router-dom'; -import { useAccountLookup } from 'pl-fe/api/hooks/accounts/useAccountLookup'; +import { useAccountLookup } from 'pl-fe/api/hooks/accounts/use-account-lookup'; import Column from 'pl-fe/components/ui/column'; import Layout from 'pl-fe/components/ui/layout'; import Tabs from 'pl-fe/components/ui/tabs'; @@ -18,9 +18,9 @@ import { PinnedAccountsPanel, AccountNotePanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config'; import { getAcct } from 'pl-fe/utils/accounts'; interface IProfileLayout { diff --git a/packages/pl-fe/src/layouts/remote-instance-layout.tsx b/packages/pl-fe/src/layouts/remote-instance-layout.tsx index 9a946df235..424f903aa2 100644 --- a/packages/pl-fe/src/layouts/remote-instance-layout.tsx +++ b/packages/pl-fe/src/layouts/remote-instance-layout.tsx @@ -7,8 +7,8 @@ import { InstanceInfoPanel, InstanceModerationPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { federationRestrictionsDisclosed } from 'pl-fe/utils/state'; interface IRemoteInstanceLayout { diff --git a/packages/pl-fe/src/layouts/search-layout.tsx b/packages/pl-fe/src/layouts/search-layout.tsx index 4141975bcb..4c3b93f11d 100644 --- a/packages/pl-fe/src/layouts/search-layout.tsx +++ b/packages/pl-fe/src/layouts/search-layout.tsx @@ -7,8 +7,8 @@ import { TrendsPanel, SignUpPanel, } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface ISearchLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/layouts/status-layout.tsx b/packages/pl-fe/src/layouts/status-layout.tsx index bdf0114c57..277e3d9207 100644 --- a/packages/pl-fe/src/layouts/status-layout.tsx +++ b/packages/pl-fe/src/layouts/status-layout.tsx @@ -3,8 +3,8 @@ import React from 'react'; import Layout from 'pl-fe/components/ui/layout'; import LinkFooter from 'pl-fe/features/ui/components/link-footer'; import { WhoToFollowPanel, TrendsPanel, SignUpPanel } from 'pl-fe/features/ui/util/async-components'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useFeatures } from 'pl-fe/hooks/use-features'; interface IStatusLayout { children: React.ReactNode; diff --git a/packages/pl-fe/src/queries/accounts.ts b/packages/pl-fe/src/queries/accounts.ts index 6dbe031991..0ea2a6cdf4 100644 --- a/packages/pl-fe/src/queries/accounts.ts +++ b/packages/pl-fe/src/queries/accounts.ts @@ -1,8 +1,8 @@ import { useMutation } from '@tanstack/react-query'; import { patchMeSuccess } from 'pl-fe/actions/me'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useClient } from 'pl-fe/hooks/use-client'; import toast from 'pl-fe/toast'; type UpdateCredentialsData = { diff --git a/packages/pl-fe/src/queries/chats.ts b/packages/pl-fe/src/queries/chats.ts index e617ab7715..b8a155fcdf 100644 --- a/packages/pl-fe/src/queries/chats.ts +++ b/packages/pl-fe/src/queries/chats.ts @@ -7,12 +7,12 @@ import { importFetchedAccount, importFetchedAccounts } from 'pl-fe/actions/impor import { ChatWidgetScreens, useChatContext } from 'pl-fe/contexts/chat-context'; import { useStatContext } from 'pl-fe/contexts/stat-context'; import { Entities } from 'pl-fe/entity-store/entities'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useAppSelector } from 'pl-fe/hooks/useAppSelector'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useFeatures } from 'pl-fe/hooks/useFeatures'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; -import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useAppSelector } from 'pl-fe/hooks/use-app-selector'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useFeatures } from 'pl-fe/hooks/use-features'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; +import { useOwnAccount } from 'pl-fe/hooks/use-own-account'; import { type ChatMessage, normalizeChatMessage } from 'pl-fe/normalizers/chat-message'; import { reOrderChatListItems } from 'pl-fe/utils/chats'; import { flattenPages, updatePageItem } from 'pl-fe/utils/queries'; diff --git a/packages/pl-fe/src/queries/embed.ts b/packages/pl-fe/src/queries/embed.ts index d344edec23..0733f8a861 100644 --- a/packages/pl-fe/src/queries/embed.ts +++ b/packages/pl-fe/src/queries/embed.ts @@ -1,6 +1,6 @@ import { useQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; type Embed = { type: string; diff --git a/packages/pl-fe/src/queries/relationships.ts b/packages/pl-fe/src/queries/relationships.ts index 650efcec98..718856c1e0 100644 --- a/packages/pl-fe/src/queries/relationships.ts +++ b/packages/pl-fe/src/queries/relationships.ts @@ -1,6 +1,6 @@ import { useMutation } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; const useFetchRelationships = () => { const client = useClient(); diff --git a/packages/pl-fe/src/queries/search.ts b/packages/pl-fe/src/queries/search.ts index 8e33c58511..12c2f40229 100644 --- a/packages/pl-fe/src/queries/search.ts +++ b/packages/pl-fe/src/queries/search.ts @@ -1,6 +1,6 @@ import { keepPreviousData, useInfiniteQuery } from '@tanstack/react-query'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useClient } from 'pl-fe/hooks/use-client'; import { flattenPages } from 'pl-fe/utils/queries'; import type { Account, PaginatedResponse } from 'pl-api'; diff --git a/packages/pl-fe/src/queries/suggestions.ts b/packages/pl-fe/src/queries/suggestions.ts index c22b4b39cf..31476edb92 100644 --- a/packages/pl-fe/src/queries/suggestions.ts +++ b/packages/pl-fe/src/queries/suggestions.ts @@ -2,8 +2,8 @@ import { useMutation, keepPreviousData, useQuery } from '@tanstack/react-query'; import { fetchRelationships } from 'pl-fe/actions/accounts'; import { importFetchedAccounts } from 'pl-fe/actions/importer'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useClient } from 'pl-fe/hooks/useClient'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useClient } from 'pl-fe/hooks/use-client'; import { removePageItem } from '../utils/queries'; diff --git a/packages/pl-fe/src/queries/trends.ts b/packages/pl-fe/src/queries/trends.ts index 29f3b3b9d8..c34cf3cf80 100644 --- a/packages/pl-fe/src/queries/trends.ts +++ b/packages/pl-fe/src/queries/trends.ts @@ -1,9 +1,9 @@ import { useQuery } from '@tanstack/react-query'; import { fetchTrendsSuccess } from 'pl-fe/actions/trends'; -import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch'; -import { useClient } from 'pl-fe/hooks/useClient'; -import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn'; +import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch'; +import { useClient } from 'pl-fe/hooks/use-client'; +import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; import type { Tag } from 'pl-api';