Skip to content

Commit

Permalink
Merge pull request #152 from dappforce/content-staking-redirect
Browse files Browse the repository at this point in the history
Add redirect for content staking page
  • Loading branch information
samchuk-vlad authored Mar 12, 2024
2 parents c3462bf + 46c608b commit ba08331
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
11 changes: 11 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ const nextConfig = {

return config
},

async redirects() {
return [
{
source: '/creators',
destination: 'https://grillapp.net/c/staking',
permanent: false,
},
]
},

images: {
remotePatterns: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/txHistory/transactions/Transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const subscanLinksByNetwork: Record<string, string> = {
astar: 'https://astar.subscan.io/extrinsic/',
moonbeam: 'https://moonbeam.subscan.io/extrinsic/',
moonriver: 'https://moonriver.subscan.io/extrinsic/',
subsocial: 'https://calamar.app/search?network=subsocial&query=',
subsocial: 'https://polkaholic.io/tx/',
}

type TransferRowProps = {
Expand Down
6 changes: 0 additions & 6 deletions src/layout/SideMenuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ export const DefaultMenu = (t: any, isAllNetworksConnected: boolean) => {
items: validatorStakingItems.filter(isDef),
hidden: isMulti || !isSignIn,
},
{
name: 'Content Staking',
page: [ '/creators' ],
icon: <img className='anticon' src='/images/creator-staking-user.svg' />,
hidden: !isSignIn,
},
Divider,
{
name: t('general.networkStatus'),
Expand Down
25 changes: 7 additions & 18 deletions src/pages/creators/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import CreatorsStakingPage from 'src/components/main/CreatorStakingPage'
import { getInitialPropsWithRedux } from 'src/rtk/app/nextHelpers'
import { fetchCreatorsList } from '../../rtk/features/creatorStaking/creatorsList/creatorsListHooks'
import { FETCH_CHIAN_INFO_WITH_PRICES } from 'src/rtk/app/actions'
import { fetchStakingConsts } from '../../rtk/features/creatorStaking/stakingConsts/stakingConstsHooks'
import { redirect } from 'next/navigation'

getInitialPropsWithRedux(CreatorsStakingPage, async ({ dispatch }) => {
dispatch({ type: FETCH_CHIAN_INFO_WITH_PRICES })
fetchCreatorsList(dispatch)
fetchStakingConsts(dispatch)
const CreatorsStakingPage = () => {
return <></>
}

return {
head: {
title: 'Join The Creator Economy On Subsocial',
desc: 'Earn rewards when you post content or engage with others in Subsocial\'s Content Staking system. Lock some SUB to get started today!',
image: '/images/creator-staking/meta-bg.jpg',
forceTitle: true,
},
}
})
export const getServerSideProps = () => {
redirect('https://grillapp.net/c/staking')
}

export default CreatorsStakingPage

0 comments on commit ba08331

Please sign in to comment.