2023-12-06 13:31:40 +00:00
|
|
|
import { useEffect } from 'react';
|
|
|
|
import { titlefy } from '@vegaprotocol/utils';
|
2023-11-21 11:08:33 +00:00
|
|
|
import { useT } from '../../lib/use-t';
|
2023-11-15 21:46:19 +00:00
|
|
|
import { RewardsContainer } from '../../components/rewards-container';
|
2023-11-27 08:18:59 +00:00
|
|
|
import { usePageTitleStore } from '../../stores';
|
2023-12-06 13:31:40 +00:00
|
|
|
import { ErrorBoundary } from '../../components/error-boundary';
|
2023-11-15 21:46:19 +00:00
|
|
|
|
|
|
|
export const Rewards = () => {
|
2023-11-21 11:08:33 +00:00
|
|
|
const t = useT();
|
2023-11-27 08:18:59 +00:00
|
|
|
const title = t('Rewards');
|
|
|
|
const { updateTitle } = usePageTitleStore((store) => ({
|
|
|
|
updateTitle: store.updateTitle,
|
|
|
|
}));
|
|
|
|
useEffect(() => {
|
|
|
|
updateTitle(titlefy([title]));
|
|
|
|
}, [updateTitle, title]);
|
2023-11-15 21:46:19 +00:00
|
|
|
return (
|
2023-12-06 13:31:40 +00:00
|
|
|
<ErrorBoundary feature="rewards">
|
|
|
|
<div className="container mx-auto p-4">
|
|
|
|
<h1 className="px-4 pb-4 text-2xl">{title}</h1>
|
|
|
|
<RewardsContainer />
|
|
|
|
</div>
|
|
|
|
</ErrorBoundary>
|
2023-11-15 21:46:19 +00:00
|
|
|
);
|
|
|
|
};
|