Skip to content

Commit

Permalink
feat: added skeleton loaders to address
Browse files Browse the repository at this point in the history
  • Loading branch information
Loque18 committed Nov 16, 2023
1 parent 136acaa commit b022654
Show file tree
Hide file tree
Showing 14 changed files with 193 additions and 190 deletions.
297 changes: 138 additions & 159 deletions src/app/(header-footer-layout)/address/[address]/page.tsx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/app/(header-footer-layout)/address/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import AppConfig from '@/static/app.config';
import { Metadata } from 'next';

import AppConfig from 'src/static/app.config';

export const metadata: Metadata = {
title: `Account | ${AppConfig.name} `,
};
Expand Down
12 changes: 6 additions & 6 deletions src/app/(header-footer-layout)/blockchain/nodes/single/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use client';
import Pagination from '@/components/internal/pagination/pagination.component';
import Tags from '@/components/internal/tags/tags.component';
import Tooltip from '@/components/internal/tooltip/tooltip.component';
import { BnToDec, shortenAddress } from '@/shared/utils/formatters';
import { copyToClipboard } from '@/shared/utils/functions';
import ROUTES from '@/static/router.data';
import Pagination from 'src/components/internal/pagination/pagination.component';
import Tags from 'src/components/internal/tags/tags.component';
import Tooltip from 'src/components/internal/tooltip/tooltip.component';
import { BnToDec, shortenAddress } from 'src/shared/utils/formatters';
import { copyToClipboard } from 'src/shared/utils/functions';
import ROUTES from 'src/static/router.data';
import Image from 'next/image';
import Link from 'next/link';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(header-footer-layout)/blocks/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import Pagination from 'src/components/internal/pagination/pagination.component'
import QuickPagination from 'src/components/internal/quick-pagination/quick-pagination.component';
import StatBoxSkeleton from 'src/components/skeletons/root/stat-box.skeleton';
import Tooltip from 'src/components/internal/tooltip/tooltip.component';
import ErrorComponent from 'src/components/error/error.component';

import QueryApi from 'src/shared/api/query-api';
import { BnToDec, shortenAddress, timeAgo } from 'src/shared/utils/formatters';
import { copyToClipboard } from 'src/shared/utils/functions';

import QUERY_KEYS from 'src/static/query.keys';
import ROUTES from 'src/static/router.data';
import ErrorComponent from '@/components/error/error.component';

const headers = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/(header-footer-layout)/test/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import api from '@/shared/api/api';
import api from 'src/shared/api/api';
import axios from 'axios';
import { useQuery } from 'react-query';

Expand Down
6 changes: 4 additions & 2 deletions src/components/internal/root-page/latest-blocks-table.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { BnToDec, shortenAddress, timeAgo } from '@/shared/utils/formatters';
import ROUTES from '@/static/router.data';
import Image from 'next/image';
import Link from 'next/link';

import { BnToDec, shortenAddress, timeAgo } from 'src/shared/utils/formatters';

import ROUTES from 'src/static/router.data';

type Block = {
blockHeight: number;
timeStamp: number;
Expand Down
8 changes: 5 additions & 3 deletions src/components/internal/root-page/latest-txns-table.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { BnToDec, shortenAddress, timeAgo } from '@/shared/utils/formatters';
import { isAddress } from '@/shared/utils/functions';
import ROUTES from '@/static/router.data';
import Image from 'next/image';
import Link from 'next/link';

import { BnToDec, shortenAddress, timeAgo } from 'src/shared/utils/formatters';
import { isAddress } from 'src/shared/utils/functions';

import ROUTES from 'src/static/router.data';

type Txn = {
txnHash: string;
timeStamp: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use client';

import { BnToDec } from '@/shared/utils/formatters';
import Image from 'next/image';

import { BnToDec } from 'src/shared/utils/formatters';

type TransactionTooltipDetailsProps = {
fee: string;
usdFee: number;
Expand Down
19 changes: 19 additions & 0 deletions src/components/skeletons/address/overview-box.skeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default function OverviewBoxSkeleton() {
return (
<div className="bg-abrandc-light-grey dark:bg-agrey-900 w-full min-h-[192px] rounded-xl p-4">
<div className="skeleton-container h-full flex flex-col justify-between">
<div className="skeleton-title max-w-[150px]"></div>

<div className="space-y-2">
<div className="skeleton-line max-w-[250px]"></div>
<div className="skeleton-line max-w-[150px]"></div>
</div>

<div className="space-y-2">
<div className="skeleton-line max-w-[200px]"></div>
<div className="skeleton-line max-w-[180px]"></div>
</div>
</div>
</div>
);
}
22 changes: 12 additions & 10 deletions src/layout/footer/footer.component.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
'use client';

import 'src/components/internal/text-field/text-field.scss';

import Button from '@/components/internal/button/button.component';
import TextButton from '@/components/internal/text-button/text-button.component';
import ROUTES from '@/static/router.data';
import { useFormik } from 'formik';
import Link from 'next/link';
import { SetStateAction, useEffect, useState } from 'react';
import { useState } from 'react';

import { toast } from 'react-toastify';
import { useFormik } from 'formik';
import * as yup from 'yup';

import '../footer/footer.component.scss';
import Button from 'src/components/internal/button/button.component';

import ROUTES from 'src/static/router.data';

import 'src/components/internal/text-field/text-field.scss';

import './footer.component.scss';

export default function FooterComponent() {
const navigation = [
Expand Down Expand Up @@ -39,8 +41,8 @@ export default function FooterComponent() {

const socials = [
{
icon: <i className="fab fa-twitter" />,
label: 'Join our Twitter',
icon: <i className="fa-brands fa-x-twitter" />,
label: 'Join our X',
href: 'https://twitter.com/pwrlabs',
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/api/responses/explorer-info.response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Block } from '@/shared/models/block.model';
import { Block } from 'src/shared/models/block.model';

type Txn = {
txnHash: string;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/api/responses/txn/latests-txns.response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Block } from '@/shared/models/block.model';
import { Block } from 'src/shared/models/block.model';

type Txn = {
txnHash: string;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/services/theme/theme.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import STORAGE_KEYS from '@/static/storage.keys';
import STORAGE_KEYS from 'src/static/storage.keys';

import { type Theme } from './theme.type';

Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
},
"baseUrl": "."
},
"include": [
Expand Down

0 comments on commit b022654

Please sign in to comment.