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

Don't redirect / to /staking #286

Merged
merged 3 commits into from
Nov 29, 2023
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
4 changes: 2 additions & 2 deletions frontend/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import YoutubeIcon from './icons/YoutubeIcon'

const Footer = () => {
return (
<div className="before:gradient-border relative bottom-0 flex w-full flex-col items-center justify-between gap-y-8 px-8 py-8 before:top-0 before:bottom-[initial] md:flex-row md:gap-y-0">
<Link href="/staking">
<div className="before:gradient-border relative bottom-0 flex w-full flex-col items-center justify-between gap-y-8 px-8 py-8 before:bottom-[initial] before:top-0 md:flex-row md:gap-y-0">
<Link href="/">
<a className="md:basis-[195px]">
<img src="/pyth.svg" className="" />
</a>
Expand Down
12 changes: 5 additions & 7 deletions frontend/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ const Header = () => {
<div className="before:gradient-border relative -bottom-[1px] mb-3">
<div className="col-span-12 flex h-24 items-center justify-between px-8 md:px-8 xl:col-span-10 xl:col-start-2">
<div className="flex basis-[160px] cursor-pointer items-center">
<Link href="/staking">
<Link href="/">
<img src="/pyth-logo-white.svg" className="h-30 mr-3" />
</Link>
</div>
<div className="hidden space-x-10 md:flex">
<Link href="/staking">
<Link href="/">
<a
className={
router.pathname == '/staking'
? 'nav-link font-bold'
: 'nav-link '
router.pathname == '/' ? 'nav-link font-bold' : 'nav-link '
}
>
Staking
Expand Down Expand Up @@ -82,7 +80,7 @@ const Header = () => {
<Dialog.Overlay className="fixed inset-0 bg-dark" />
<div className="height-screen fixed top-0 mx-auto w-full rounded px-8 py-6">
<div className="flex items-center justify-between space-x-2 pt-[7px]">
<Link href="/staking">
<Link href="/">
<img src="/pyth-logo-white.svg" className="h-30 mr-3" />
</Link>
<button
Expand All @@ -97,7 +95,7 @@ const Header = () => {
</button>
</div>
<div className="griw-rows-2 grid space-y-5 pt-10 text-center text-base18">
<Link href="/staking">
<Link href="/">
<a>Staking</a>
</Link>
<Link
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/modals/LockedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useUnvestedUnlockAllMutation } from 'hooks/useUnvestedUnlockAllMutation
import { useBalance } from 'hooks/useBalance'
import { useNextVestingEvent } from 'hooks/useNextVestingEvent'
import { useStakeConnection } from 'hooks/useStakeConnection'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

export type LockedModalProps = {
isLockedModalOpen: boolean
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/panels/StakePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { VestingAccountState } from '@pythnetwork/staking'
import { usePythBalance } from 'hooks/usePythBalance'
import { useStakeConnection } from 'hooks/useStakeConnection'
import { useVestingAccountState } from 'hooks/useVestingAccountState'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

type StakePanelProps = {
mainStakeAccount: MainStakeAccount
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/panels/UnstakePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useBalance } from 'hooks/useBalance'
import { useStakeConnection } from 'hooks/useStakeConnection'
import { useStakeAccounts } from 'hooks/useStakeAccounts'
import { useVestingAccountState } from 'hooks/useVestingAccountState'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

type UnstakePanelProps = {
mainStakeAccount: MainStakeAccount
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/panels/WithdrawPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useBalance } from 'hooks/useBalance'
import { useWithdrawMutation } from 'hooks/useWithdrawMutation'
import { useStakeConnection } from 'hooks/useStakeConnection'
import { useStakeAccounts } from 'hooks/useStakeAccounts'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

type WithdrawPanelProps = {
mainStakeAccount: MainStakeAccount
Expand Down
2 changes: 1 addition & 1 deletion frontend/hooks/useBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useStakeConnection } from './useStakeConnection'
import { PythBalance } from '@pythnetwork/staking'
import toast from 'react-hot-toast'
import { capitalizeFirstLetter } from 'utils/capitalizeFirstLetter'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

export const BalanceQueryKeyPrefix = 'balance'

Expand Down
2 changes: 1 addition & 1 deletion frontend/hooks/useDepositMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PythBalance, StakeConnection } from '@pythnetwork/staking'
import toast from 'react-hot-toast'
import { StakeConnectionQueryKey } from './useStakeConnection'
import { useMutation, useQueryClient } from 'react-query'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

export function useDepositMutation() {
const queryClient = useQueryClient()
Expand Down
2 changes: 1 addition & 1 deletion frontend/hooks/useNextVestingEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PythBalance } from '@pythnetwork/staking'
import BN from 'bn.js'
import { useQuery } from 'react-query'
import { useStakeConnection } from './useStakeConnection'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

export function useNextVestingEvent(mainStakeAccount: MainStakeAccount) {
const { data: stakeConnection } = useStakeConnection()
Expand Down
3 changes: 1 addition & 2 deletions frontend/hooks/useVestingAccountState.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useQuery } from 'react-query'
import { useStakeConnection } from './useStakeConnection'
import { StakeAccount } from '@pythnetwork/staking'
import { MainStakeAccount } from 'pages/staking'
import { MainStakeAccount } from 'pages'

export const VestingAccountStateQueryPrefix = 'vesting-account-state'

Expand Down
9 changes: 0 additions & 9 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,4 @@ module.exports = {
}
return config
},
async redirects() {
return [
{
source: '/',
destination: '/staking',
permanent: true,
},
]
},
}
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && next export && echo '/ /staking' > out/_redirects",
"build": "next build && next export",
"serve": "serve out",
"start": "next start"
},
Expand Down
Loading