Skip to content

Commit

Permalink
Merge pull request #2295 from lpsinger/type-safe-return-values-for-us…
Browse files Browse the repository at this point in the history
…eDomain

Ensure that inferred useDomain return type is compatible with client
  • Loading branch information
dakota002 authored May 23, 2024
2 parents bbb084f + 216aeee commit 799f515
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/ClientSampleCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function useDomain() {

if (hostname === 'gcn.nasa.gov') {
return null
} else if (hostname?.endsWith('gcn.nasa.gov')) {
return hostname
} else if (hostname === 'dev.gcn.nasa.gov') {
return 'dev.gcn.nasa.gov'
} else {
return 'test.gcn.nasa.gov'
}
Expand Down

0 comments on commit 799f515

Please sign in to comment.