Skip to content

Commit

Permalink
General improvements (#2122)
Browse files Browse the repository at this point in the history
* feat: removed login button

* Update js-lake-indexer.md

* Update indexing-tools.md

* Update python-lake-indexer.md

---------

Co-authored-by: Damián Parrino <bucanero@users.noreply.github.com>
  • Loading branch information
gagdiez and bucanero authored Jul 8, 2024
1 parent 1f4349c commit c6d999b
Show file tree
Hide file tree
Showing 21 changed files with 372 additions and 651 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ In the `index.ts` file let's import the necessary dependencies:
import { startStream, types } from 'near-lake-framework';
```

We've imported the main function `startStream` which will be called to actually run the indexer, and `types` that hold the `LakeConfig` type we need to contruct.
We've imported the main function `startStream`, which will be called to actually run the indexer, and `types`, which hold the `LakeConfig` type we need to construct.

## Create a config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In the `main.py` file let's import the necessary dependencies:
from near_lake_framework import near_primitives, LakeConfig, streamer
```

We've imported the main function `streamer` which will be called to actually run the indexer, `near_primitives` and `LakeConfig` type we need to contruct.
We've imported the main function `streamer`, which will be called to actually run the indexer, `near_primitives`, and `LakeConfig` type we need to construct.

## Create a config

Expand Down
34 changes: 17 additions & 17 deletions docs/3.tutorials/near-components/design-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: ds-components
title: Design Components
---
import {WidgetEditor} from "@site/src/components/widget-editor-mainnet";
import {WidgetEditor} from "@site/src/components/widget-editor";

# Design System Components

Expand Down Expand Up @@ -181,7 +181,7 @@ If you want to see working demos of these components, check the [DIG Overview pa

An accordion built with the [Radix primitive](https://www.radix-ui.com/docs/primitives/components/accordion).

<WidgetEditor id="1">
<WidgetEditor networkId="mainnet" id="1">

```jsx
// Rendering the component with props
Expand Down Expand Up @@ -230,7 +230,7 @@ return (<Widget

This component renders an avatar.

<WidgetEditor id="2">
<WidgetEditor networkId="mainnet" id="2">

```jsx
const accountId = "root.near";
Expand Down Expand Up @@ -264,7 +264,7 @@ return (

This component renders a badge. Badges are not meant to be clickable. Refer to [DIG.Button](#digbutton) or [DIG.Chip](#digchip) for clickable alternatives.

<WidgetEditor id="3">
<WidgetEditor networkId="mainnet" id="3">

```jsx
// Rendering the component with props
Expand Down Expand Up @@ -294,7 +294,7 @@ return (

A fully featured button component that can act as a `<button>` or `<a>` tag.

<WidgetEditor id="4">
<WidgetEditor networkId="mainnet" id="4">

```jsx
// Rendering the component with props
Expand All @@ -314,7 +314,7 @@ return <Widget src="near/widget/DIG.Button" props={{ label: "Click Me" }} />;

A checkbox built with the [Radix primitive](https://www.radix-ui.com/docs/primitives/components/checkbox).

<WidgetEditor id="5">
<WidgetEditor networkId="mainnet" id="5">

```jsx
// Rendering the component with props
Expand All @@ -338,7 +338,7 @@ return <Widget

A fully featured chip component that can act as a `<button>` or `<a>` tag.

<WidgetEditor id="6">
<WidgetEditor networkId="mainnet" id="6">

```jsx
// Rendering the component with props
Expand All @@ -359,7 +359,7 @@ return (<Widget src="near/widget/DIG.Chip" props={{ label: 'Click Me' }} />);

This Dialog component is built with the [Radix primitive](https://www.radix-ui.com/primitives/docs/components/dialog).

<WidgetEditor id="7">
<WidgetEditor networkId="mainnet" id="7">

```jsx
State.init({
Expand Down Expand Up @@ -417,7 +417,7 @@ return (

This dropdown menu is built with the [Radix primitive](https://www.radix-ui.com/primitives/docs/components/dropdown-menu).

<WidgetEditor id="8">
<WidgetEditor networkId="mainnet" id="8">

```jsx
// Rendering the component with props
Expand Down Expand Up @@ -457,7 +457,7 @@ return (<Widget

A text input component.

<WidgetEditor id="9">
<WidgetEditor networkId="mainnet" id="9">

```jsx
State.init({
Expand Down Expand Up @@ -494,7 +494,7 @@ return (

An input component for typing a search query.

<WidgetEditor id="10">
<WidgetEditor networkId="mainnet" id="10">

```jsx
// Rendering the component with props
Expand Down Expand Up @@ -522,7 +522,7 @@ return (

A select input component built with the [Radix primitive](https://www.radix-ui.com/docs/primitives/components/select).

<WidgetEditor id="11">
<WidgetEditor networkId="mainnet" id="11">

```jsx
State.init({
Expand Down Expand Up @@ -591,7 +591,7 @@ return (

An input component that handles adding and removing tags.

<WidgetEditor id="12">
<WidgetEditor networkId="mainnet" id="12">

```jsx
State.init({
Expand Down Expand Up @@ -627,7 +627,7 @@ return (

A textarea input component.

<WidgetEditor id="13">
<WidgetEditor networkId="mainnet" id="13">

```jsx
State.init({
Expand Down Expand Up @@ -663,7 +663,7 @@ return (

This tabs component is built with the [Radix primitive](https://www.radix-ui.com/docs/primitives/components/tabs).

<WidgetEditor id="14">
<WidgetEditor networkId="mainnet" id="14">

```jsx
// Rendering the component with props
Expand Down Expand Up @@ -722,7 +722,7 @@ You can use any of the [CSS variables](https://near.org/near/widget/ComponentDet

This toast component is built with [Radix primitive](https://www.radix-ui.com/primitives/docs/components/toast).

<WidgetEditor id="16">
<WidgetEditor networkId="mainnet" id="16">

```jsx
State.init({ showToast: false });
Expand Down Expand Up @@ -775,7 +775,7 @@ return (

A tooltip built with the [Radix primitive](https://www.radix-ui.com/docs/primitives/components/tooltip).

<WidgetEditor id="17">
<WidgetEditor networkId="mainnet" id="17">

```jsx
// Rendering the component with props
Expand Down
2 changes: 1 addition & 1 deletion docs/4.tools/indexing-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Here's a quick overview of Indexer projects on the NEAR ecosystem:
- [NEAR Indexer for Explorer](https://github.com/near/near-indexer-for-explorer): an indexer built on top of the indexer microframework. It watches and stores all events/data from the blockchain to a **PostgreSQL database**.
You can clone the [GitHub repository](https://github.com/near/near-indexer-for-explorer) and customize your own indexer solution.

- [SubQuery](https://academy.subquery.network/quickstart/quickstart_chains/near.html): is an end to end multi-blockchain indexing solution that provides NEAR developers with fast, flexible, universal, open source and decentralised APIs for web3 projects. The [NEAR starter project](https://github.com/subquery/near-subql-starter/tree/main/Near/near-starter) provides a template for developers to get up and running within minutes.
- [SubQuery](https://academy.subquery.network/quickstart/quickstart_chains/near.html): is an end to end multi-blockchain indexing solution that provides NEAR developers with fast, flexible, universal, open source and decentralized APIs for web3 projects. The [NEAR starter project](https://github.com/subquery/near-subql-starter/tree/main/Near/near-starter) provides a template for developers to get up and running within minutes.
12 changes: 2 additions & 10 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const config = {
navbar: {
logo: {
alt: 'NEAR Logo',
src: 'img/near_logo.svg',
srcDark: 'img/near_logo_white.svg',
src: 'img/docs_logo.svg',
srcDark: 'img/docs_logo_white.svg',
},
items: [
{
Expand Down Expand Up @@ -229,19 +229,11 @@ const config = {
},
],
},
{
type: 'search',
position: 'right',
},
{ label: 'Blog', href: '/blog' },
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'login',
position: 'right',
},
],
},
footer: {
Expand Down
14 changes: 7 additions & 7 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"crowdin:download": "crowdin download"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.3.2",
"@docusaurus/types": "3.3.2",
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/types": "^3.4.0",
"@types/react": "^18.2.42",
"buffer": "^6.0.3",
"concurrently": "^5.3.0",
Expand All @@ -32,11 +32,11 @@
},
"dependencies": {
"@crowdin/cli": "^3.9.0",
"@docusaurus/core": "^3.3.2",
"@docusaurus/plugin-ideal-image": "^3.3.2",
"@docusaurus/plugin-sitemap": "^3.3.2",
"@docusaurus/preset-classic": "^3.3.2",
"@docusaurus/theme-mermaid": "^3.3.2",
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-ideal-image": "^3.4.0",
"@docusaurus/plugin-sitemap": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-mermaid": "^3.4.0",
"@feelback/react": "^0.3.4",
"@near-wallet-selector/core": "^8.5.1",
"@near-wallet-selector/here-wallet": "^8.5.1",
Expand Down
6 changes: 2 additions & 4 deletions website/src/components/near-widget.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useState, useEffect } from "react";
import { useWallet } from '@theme/scripts/wallet-selector';
import BrowserOnly from '@docusaurus/BrowserOnly';
import "react-bootstrap-typeahead/css/Typeahead.css";
import "react-bootstrap-typeahead/css/Typeahead.bs5.css";

export function NearWidget({ children, id = 1, height = "160px" }) {
export function NearWidget({ children, id = 1, height = "160px", networkId = 'testnet' }) {

return (
<BrowserOnly fallback={<div> Loading... </div>}>
Expand All @@ -18,10 +17,9 @@ export function NearWidget({ children, id = 1, height = "160px" }) {

const [code, setCode] = useState(startCode);
const { initNear } = useInitNear();
const { selector } = useWallet();

useEffect(() => {
initNear && selector && initNear({ networkId: 'testnet', selector });
initNear && initNear({ networkId, selector: new Promise(() => {}) });
}, [initNear, selector]);

return <>
Expand Down
65 changes: 0 additions & 65 deletions website/src/components/social-widget.js

This file was deleted.

65 changes: 0 additions & 65 deletions website/src/components/widget-editor-mainnet.js

This file was deleted.

Loading

0 comments on commit c6d999b

Please sign in to comment.