Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 13, 2024
1 parent f6b5513 commit 5e277d4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 37 deletions.
6 changes: 4 additions & 2 deletions apps/web/src/components/Search/Accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { AccountLinkSource } from "@hey/data/tracking";
import {
type Account,
type AccountSearchRequest,
AccountsRequest,
PageSize,
useAccountsQuery,
useSearchAccountsQuery
} from "@hey/indexer";
import { Card, EmptyState, ErrorMessage } from "@hey/ui";
Expand All @@ -17,12 +19,12 @@ interface AccountsProps {
}

const Accounts: FC<AccountsProps> = ({ query }) => {
const request: AccountSearchRequest = {
const request: AccountsRequest = {
pageSize: PageSize.Fifty,
localName: query
};

const { data, error, fetchMore, loading } = useSearchAccountsQuery({
const { data, error, fetchMore, loading } = useAccountsQuery({
skip: !query,
variables: { request }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ fragment GroupFields on Group {
isMember
metadata {
name
slug
description
icon
coverPicture
Expand Down
7 changes: 6 additions & 1 deletion packages/indexer/documents/queries/account/Accounts.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
query Accounts($request: AccountsRequest!) {
accounts(request: $request) {
...AccountFields
items {
...AccountFields
}
pageInfo {
...PaginatedResultInfoFields
}
}
}
10 changes: 0 additions & 10 deletions packages/indexer/documents/queries/account/SearchAccounts.graphql

This file was deleted.

12 changes: 9 additions & 3 deletions packages/indexer/documents/queries/account/StaffPicks.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ query StaffPicks(
$batch3: [EvmAddress!]
) {
batch1: accounts(request: { addresses: $batch1 }) {
...AccountFields
items {
...AccountFields
}
}
batch2: accounts(request: { addresses: $batch2 }) {
...AccountFields
items {
...AccountFields
}
}
batch3: accounts(request: { addresses: $batch3 }) {
...AccountFields
items {
...AccountFields
}
}
}
10 changes: 0 additions & 10 deletions packages/indexer/documents/queries/group/SearchGroups.graphql

This file was deleted.

10 changes: 0 additions & 10 deletions packages/indexer/documents/queries/post/SearchPosts.graphql

This file was deleted.

0 comments on commit 5e277d4

Please sign in to comment.