Redirect to top cowboys page if there's a time descriptor (#1913)

* redirect to cowboys.js if there's a time descriptor

* add comment for future reference

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
This commit is contained in:
soxa 2025-03-01 23:52:37 +01:00 committed by GitHub
parent dfc297436b
commit 5e7fd693f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -189,6 +189,11 @@ module.exports = withPlausibleProxy()({
source: '/statistics', source: '/statistics',
destination: '/satistics?inc=invoice,withdrawal', destination: '/satistics?inc=invoice,withdrawal',
permanent: true permanent: true
},
{
source: '/top/cowboys/:when',
destination: '/top/cowboys',
permanent: true
} }
] ]
}, },

View File

@ -6,6 +6,7 @@ import UserList from '@/components/user-list'
export const getServerSideProps = getGetServerSideProps({ query: TOP_COWBOYS }) export const getServerSideProps = getGetServerSideProps({ query: TOP_COWBOYS })
// if a when descriptor is provided, it redirects here; see next.config.js
export default function Index ({ ssrData }) { export default function Index ({ ssrData }) {
return ( return (
<Layout> <Layout>