Skip to content

Commit

Permalink
fix the discord links issue by just getting rid of % in links (#518)
Browse files Browse the repository at this point in the history
Resolves #506
  • Loading branch information
kavigupta authored Nov 2, 2024
1 parent e7cdba2 commit 8cd063b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion react/src/navigation/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function statistic_link(universe: string | undefined, statname: string, a
start = start + 1
}
const params = new URLSearchParams()
params.set('statname', statname)
params.set('statname', statname.replace('%', '__PCT__'))
params.set('article_type', article_type)
params.set('start', start.toString())
params.set('amount', `${amount}`)
Expand Down
2 changes: 1 addition & 1 deletion react/src/statistic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function loadPage(): Promise<void> {

// TODO: Use zod to better parse these
const article_type = window_info.get('article_type')!
const statname = window_info.get('statname')!
const statname = window_info.get('statname')!.replace('__PCT__', '%')
const start = parseInt(window_info.get('start') ?? '1')
const amount = window_info.get('amount')
const order = (window_info.get('order') ?? 'descending') as 'ascending' | 'descending'
Expand Down

0 comments on commit 8cd063b

Please sign in to comment.