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