-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: live data in blocks list (#74)
- Loading branch information
1 parent
6fbb222
commit 5f1f3f8
Showing
9 changed files
with
108 additions
and
774 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 52 additions & 30 deletions
82
services/explorer-ui/src/components/blocks/block-table-columns.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 8 additions & 9 deletions
17
services/explorer-ui/src/components/blocks/blocks-table.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
import { blockTableColumns } from "~/components/blocks/block-table-columns"; | ||
import { allBlocks } from "~/components/blocks/blocks"; | ||
import { FC } from "react"; | ||
import { DataTable } from "~/components/data-table"; | ||
import { BlockTableColumns } from "./block-table-columns"; | ||
import { type BlockTableSchema } from "./blocks-schema"; | ||
|
||
export const BlocksTable = () => { | ||
const blocks = getBlocks(); | ||
interface Props { | ||
blocks: BlockTableSchema[]; | ||
} | ||
|
||
export const BlocksTable: FC<Props> = ({ blocks }) => { | ||
return ( | ||
<section className="relative mx-auto w-full transition-all"> | ||
<DataTable data={blocks} columns={blockTableColumns} /> | ||
<DataTable data={blocks} columns={BlockTableColumns} /> | ||
</section> | ||
); | ||
}; | ||
|
||
|
||
const getBlocks = () => { | ||
return allBlocks.blocks; | ||
} |
Oops, something went wrong.