feat(trading): update title on rewards and fees pages (#5347)
This commit is contained in:
parent
6669125dd3
commit
964deb2f23
@ -1,11 +1,21 @@
|
|||||||
import { FeesContainer } from '../../components/fees-container';
|
import { FeesContainer } from '../../components/fees-container';
|
||||||
import { useT } from '../../lib/use-t';
|
import { useT } from '../../lib/use-t';
|
||||||
|
import { usePageTitleStore } from '../../stores';
|
||||||
|
import { titlefy } from '@vegaprotocol/utils';
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export const Fees = () => {
|
export const Fees = () => {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
|
const title = t('Fees');
|
||||||
|
const { updateTitle } = usePageTitleStore((store) => ({
|
||||||
|
updateTitle: store.updateTitle,
|
||||||
|
}));
|
||||||
|
useEffect(() => {
|
||||||
|
updateTitle(titlefy([title]));
|
||||||
|
}, [updateTitle, title]);
|
||||||
return (
|
return (
|
||||||
<div className="container p-4 mx-auto">
|
<div className="container p-4 mx-auto">
|
||||||
<h1 className="px-4 pb-4 text-2xl">{t('Fees')}</h1>
|
<h1 className="px-4 pb-4 text-2xl">{title}</h1>
|
||||||
<FeesContainer />
|
<FeesContainer />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,11 +1,21 @@
|
|||||||
import { useT } from '../../lib/use-t';
|
import { useT } from '../../lib/use-t';
|
||||||
import { RewardsContainer } from '../../components/rewards-container';
|
import { RewardsContainer } from '../../components/rewards-container';
|
||||||
|
import { usePageTitleStore } from '../../stores';
|
||||||
|
import { titlefy } from '@vegaprotocol/utils';
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export const Rewards = () => {
|
export const Rewards = () => {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
|
const title = t('Rewards');
|
||||||
|
const { updateTitle } = usePageTitleStore((store) => ({
|
||||||
|
updateTitle: store.updateTitle,
|
||||||
|
}));
|
||||||
|
useEffect(() => {
|
||||||
|
updateTitle(titlefy([title]));
|
||||||
|
}, [updateTitle, title]);
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto p-4">
|
<div className="container mx-auto p-4">
|
||||||
<h1 className="px-4 pb-4 text-2xl">{t('Rewards')}</h1>
|
<h1 className="px-4 pb-4 text-2xl">{title}</h1>
|
||||||
<RewardsContainer />
|
<RewardsContainer />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user