Skip to content

Commit

Permalink
[DPLT-1007] feat: Add link to QueryApi Docs (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
roshaans authored Jun 5, 2023
1 parent 09a4382 commit 2c8d367
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions frontend/widgets/src/QueryApi.IndexerExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const Header = styled.div`
display: flex;
flex-direction: column;
gap: 12px;
min-width: 200px;
max-width: 500px;
`;

const H1 = styled.h1`
Expand Down Expand Up @@ -200,15 +202,25 @@ const TabsButton = styled.a`
}
`;

const TextLink = styled.a`
margin: 0;
font-size: 14px;
line-height: 20px;
font-weight: ${(p) => (p.bold ? "600" : "400")};
font-size: ${(p) => (p.small ? "12px" : "14px")};
overflow: ${(p) => (p.ellipsis ? "hidden" : "visible")};
text-overflow: ${(p) => (p.ellipsis ? "ellipsis" : "unset")};
white-space: nowrap;
outline: none;
&:focus,
&:hover {
text-decoration: underline;
}
`;

return (
<Wrapper className="container-xl">
{state.selectedTab == "my-indexers" && state.my_indexers.length == 0 && (
<Header>
<H1>
You currently have no indexers. Explore new Indexers and fork them!
</H1>
</Header>
)}
<Tabs>
<TabsButton
onClick={() => State.update({ selectedTab: "my-indexers" })}
Expand Down Expand Up @@ -244,6 +256,19 @@ return (
</Items>
</>
)}
{state.selectedTab == "my-indexers" && state.my_indexers.length == 0 && (
<Header>
<H2>
QueryAPI streamlines the process of querying specific data from the Near Blockchain. Explore new Indexers and fork them to try it out!
</H2>
<H2>
To learn more about QueryAPI, visit
<TextLink target="_blank" href="https://docs.near.org/bos/community/indexers" as="a" bold>
QueryAPI Docs
</TextLink>
</H2>
</Header>
)}
<Items>
{state.selectedTab == "my-indexers" && (
<>
Expand Down

0 comments on commit 2c8d367

Please sign in to comment.