Commit aeb5635c authored by Max Alekseenko's avatar Max Alekseenko Committed by GitHub

change Merits dashboard path (#2575)

parent c97e3f9d
......@@ -28,7 +28,7 @@ const OG_TYPE_DICT: Record<Route['pathname'], OGPageType> = {
'/graphiql': 'Regular page',
'/search-results': 'Regular page',
'/auth/profile': 'Root page',
'/account/rewards': 'Regular page',
'/account/merits': 'Regular page',
'/account/watchlist': 'Regular page',
'/account/api-key': 'Regular page',
'/account/custom-abi': 'Regular page',
......
......@@ -31,7 +31,7 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/graphiql': DEFAULT_TEMPLATE,
'/search-results': DEFAULT_TEMPLATE,
'/auth/profile': DEFAULT_TEMPLATE,
'/account/rewards': DEFAULT_TEMPLATE,
'/account/merits': DEFAULT_TEMPLATE,
'/account/watchlist': DEFAULT_TEMPLATE,
'/account/api-key': DEFAULT_TEMPLATE,
'/account/custom-abi': DEFAULT_TEMPLATE,
......
......@@ -28,7 +28,7 @@ const TEMPLATE_MAP: Record<Route['pathname'], string> = {
'/graphiql': 'GraphQL for %network_name% - %network_name% data query',
'/search-results': '%network_name% search result for %q%',
'/auth/profile': '%network_name% - my profile',
'/account/rewards': '%network_name% - rewards',
'/account/merits': '%network_name% - Merits',
'/account/watchlist': '%network_name% - watchlist',
'/account/api-key': '%network_name% - API keys',
'/account/custom-abi': '%network_name% - custom ABI',
......
......@@ -26,7 +26,7 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'/graphiql': 'GraphQL',
'/search-results': 'Search results',
'/auth/profile': 'Profile',
'/account/rewards': 'Merits',
'/account/merits': 'Merits',
'/account/watchlist': 'Watchlist',
'/account/api-key': 'API keys',
'/account/custom-abi': 'Custom ABI',
......
......@@ -9,7 +9,7 @@ declare module "nextjs-routes" {
| StaticRoute<"/404">
| StaticRoute<"/account/api-key">
| StaticRoute<"/account/custom-abi">
| StaticRoute<"/account/rewards">
| StaticRoute<"/account/merits">
| StaticRoute<"/account/tag-address">
| StaticRoute<"/account/verified-addresses">
| StaticRoute<"/account/watchlist">
......
......@@ -52,6 +52,10 @@ const oldUrls = [
source: '/account/public-tags-request',
destination: '/public-tags/submit',
},
{
source: '/account/rewards',
destination: '/account/merits',
},
// TRANSACTIONS
{
......
......@@ -8,7 +8,7 @@ const RewardsDashboard = dynamic(() => import('ui/pages/RewardsDashboard'), { ss
const Page: NextPage = () => {
return (
<PageNextJs pathname="/account/rewards">
<PageNextJs pathname="/account/merits">
<RewardsDashboard/>
</PageNextJs>
);
......
......@@ -37,7 +37,7 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
data-selected={ !isLoading && Boolean(apiToken) }
flexShrink={ 0 }
as={ apiToken ? LinkInternal : 'button' }
{ ...(apiToken ? { href: route({ pathname: '/account/rewards' }) } : {}) }
{ ...(apiToken ? { href: route({ pathname: '/account/merits' }) } : {}) }
onClick={ apiToken ? undefined : openLoginModal }
onFocus={ handleFocus }
fontSize="sm"
......
......@@ -122,7 +122,7 @@ const CongratsStepContent = ({ isReferral }: Props) => {
Explore your current Merits balance, find activities to boost your Merits,
and view your capybara NFT badge collection on the dashboard
</Text>
<Button mt={ 3 } as="a" href={ route({ pathname: '/account/rewards' }) }>
<Button mt={ 3 } as="a" href={ route({ pathname: '/account/merits' }) }>
Open
</Button>
</Flex>
......
......@@ -61,7 +61,7 @@ const LoginStepContent = ({ goNext, closeModal, openAuthModal }: Props) => {
goNext(isRefCodeUsed);
} else {
closeModal();
router.push({ pathname: '/account/rewards' }, undefined, { shallow: true });
router.push({ pathname: '/account/merits' }, undefined, { shallow: true });
}
}
} catch (error) {}
......
......@@ -14,7 +14,7 @@ import * as mixpanel from 'lib/mixpanel';
const PROTECTED_ROUTES: Array<Route['pathname']> = [
'/account/api-key',
'/account/custom-abi',
'/account/rewards',
'/account/merits',
'/account/tag-address',
'/account/verified-addresses',
'/account/watchlist',
......
......@@ -17,7 +17,7 @@ const NavLinkRewards = ({ isCollapsed, onClick }: Props) => {
const router = useRouter();
const { openLoginModal, dailyRewardQuery, apiToken, isInitialized } = useRewardsContext();
const pathname = '/account/rewards';
const pathname = '/account/merits';
const nextRoute = { pathname } as Route;
const handleClick = useCallback((e: React.MouseEvent) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment