Skip to content

Commit 5e7fd69

Browse files
Soxasorahuumn
andauthored
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>
1 parent dfc2974 commit 5e7fd69

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

next.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ module.exports = withPlausibleProxy()({
189189
source: '/statistics',
190190
destination: '/satistics?inc=invoice,withdrawal',
191191
permanent: true
192+
},
193+
{
194+
source: '/top/cowboys/:when',
195+
destination: '/top/cowboys',
196+
permanent: true
192197
}
193198
]
194199
},

pages/~/top/cowboys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import UserList from '@/components/user-list'
66

77
export const getServerSideProps = getGetServerSideProps({ query: TOP_COWBOYS })
88

9+
// if a when descriptor is provided, it redirects here; see next.config.js
910
export default function Index ({ ssrData }) {
1011
return (
1112
<Layout>

0 commit comments

Comments
 (0)