Skip to content

Commit

Permalink
feature: AVS details page
Browse files Browse the repository at this point in the history
  • Loading branch information
satyambnsal committed Oct 31, 2024
1 parent cba668e commit 9a09864
Show file tree
Hide file tree
Showing 2 changed files with 513 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/avs/AVSDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useMutativeReducer } from 'use-mutative';
import { useParams } from 'react-router-dom';
import { useServices } from '../@services/ServiceContext';
import { useTailwindBreakpoint } from '../shared/hooks/useTailwindBreakpoint';
import AVSDetailsCumulativeRewardsTab from './AVSDetailsCumulativeRewardsTab';

export default function AVSDetails() {
const { address, tab } = useParams();
Expand Down Expand Up @@ -180,6 +181,38 @@ export default function AVSDetails() {
/>
</Tab>


<Tab
href={`/avs/${address}/cumulative-rewards`}
key={`/avs/${address}/cumulative-rewards`}
title={
<div className="flex flex-col items-center">
<div className="text-sm text-foreground-2 group-aria-selected:text-foreground-1">
Cumulative rewards distributed
</div>
<div className="flex w-full justify-center">
{state.isAVSLoading && (
<Skeleton className="mt-2 h-4 w-full min-w-16 rounded-md" />
)}

{state.error && <ErrorMessage error={state.error} />}

{!state.isAVSLoading && !state.error && (
<span className="text-foreground-1 group-aria-selected:text-foreground">
$21,345,456.45
</span>
)}
</div>
</div>
}
>
<AVSDetailsCumulativeRewardsTab
ethRate={state.ethRate}
/>
</Tab>



<Tab
key="restakers"
title={
Expand Down
Loading

0 comments on commit 9a09864

Please sign in to comment.