Skip to content

Commit

Permalink
change link url
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Sep 12, 2024
1 parent 8f9b53e commit b4c4b20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions configs/app/features/saveOnGas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ const title = 'Save on gas with GasHawk';

const config: Feature<{
apiUrlTemplate: string;
dappId: string;
}> = (() => {
if (getEnvValue('NEXT_PUBLIC_SAVE_ON_GAS_ENABLED') === 'true' && marketplace.isEnabled) {
return Object.freeze({
title,
isEnabled: true,
dappId: 'gas-hawk',
apiUrlTemplate: 'https://core.gashawk.io/apiv2/stats/address/<address>/savingsPotential/0x1',
});
}
Expand Down
8 changes: 3 additions & 5 deletions ui/address/details/AddressSaveOnGas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { useQuery } from '@tanstack/react-query';
import React from 'react';
import * as v from 'valibot';

import { route } from 'nextjs-routes';

import config from 'configs/app';
import LinkInternal from 'ui/shared/links/LinkInternal';
import LinkExternal from 'ui/shared/links/LinkExternal';
import TextSeparator from 'ui/shared/TextSeparator';

const feature = config.features.saveOnGas;
Expand Down Expand Up @@ -79,9 +77,9 @@ const AddressSaveOnGas = ({ gasUsed, address }: Props) => {
<TextSeparator color="divider"/>
<Skeleton isLoaded={ !query.isPlaceholderData } display="flex" alignItems="center" columnGap={ 2 }>
<Image src="/static/gas_hawk_logo.svg" w="15px" h="20px" alt="GasHawk logo"/>
<LinkInternal href={ route({ pathname: '/apps/[id]', query: { id: feature.dappId } }) } fontSize="sm">
<LinkExternal href="https://www.gashawk.io" fontSize="sm">
Save { percent.toLocaleString(undefined, { maximumFractionDigits: 0 }) }% with GasHawk
</LinkInternal>
</LinkExternal>
</Skeleton>
</>
);
Expand Down

0 comments on commit b4c4b20

Please sign in to comment.