Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirect for content staking page #152

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading