Skip to content

Commit

Permalink
feat(bos-components): accounts info
Browse files Browse the repository at this point in the history
  • Loading branch information
yudhomax committed Nov 29, 2023
1 parent b4be398 commit 7aef57e
Show file tree
Hide file tree
Showing 27 changed files with 1,830 additions and 16 deletions.
2 changes: 1 addition & 1 deletion apps/app/public/common.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions apps/app/src/data/bos-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { NetworkId } from '@/utils/types';

type NetworkComponents = {
nodeExplorer: string;
account: string;
};

export const componentsByNetworkId: Record<
Expand All @@ -10,9 +11,11 @@ export const componentsByNetworkId: Record<
> = {
testnet: {
nodeExplorer: `${process.env.NEXT_PUBLIC_ACCOUNT_ID}/widget/bos-components.components.NearBlocks.NodeExplorer`,
account: `${process.env.NEXT_PUBLIC_ACCOUNT_ID}/widget/bos-components.components.NearBlocks.Accounts`,
},

mainnet: {
nodeExplorer: `${process.env.NEXT_PUBLIC_ACCOUNT_ID}/widget/bos-components.components.NearBlocks.NodeExplorer`,
account: `${process.env.NEXT_PUBLIC_ACCOUNT_ID}/widget/bos-components.components.NearBlocks.Accounts`,
},
};
18 changes: 18 additions & 0 deletions apps/app/src/pages/address/[id].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { useRouter } from 'next/router';

import { VmComponent } from '@/components/vm/VmComponent';
import { useBosComponents } from '@/hooks/useBosComponents';

const Address = () => {
const router = useRouter();
const { id } = router.query;
const components = useBosComponents();

return (
<>
<VmComponent src={components?.account} props={{ id: id }} />
</>
);
};

export default Address;
1 change: 1 addition & 0 deletions apps/bos-components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ module.exports = {
'react/display-name': 'off',
'@next/next/no-img-element': 'off',
'import/no-anonymous-default-export': 'off',
'react/jsx-no-undef': 'off',
},
};
Loading

0 comments on commit 7aef57e

Please sign in to comment.