Skip to content

Commit

Permalink
chore(TMP-1657): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
seldinpQ committed Dec 3, 2024
1 parent afd00ff commit 7d82178
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/ts-components/src/utils/getDeckApiUrl.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
export const getDeckApiUrl = (): string => {
if (typeof window !== 'undefined') {
const environmentName = window.__TIMES_CONFIG__ && window.__TIMES_CONFIG__.environmentName;
if (typeof window !== 'undefined') {
const environmentName =
window.__TIMES_CONFIG__ && window.__TIMES_CONFIG__.environmentName;

if (environmentName === 'prod') {
return 'https://editorial-tm.newsapis.co.uk/prod/deck-component-data-api';
} else {
return 'https://editorial-tm.staging.newsapis.co.uk/staging/deck-component-data-api';
}
if (environmentName === 'prod') {
return 'https://editorial-tm.newsapis.co.uk/prod/deck-component-data-api';
} else {
return 'https://editorial-tm.staging.newsapis.co.uk/staging/deck-component-data-api';
return 'https://editorial-tm.staging.newsapis.co.uk/staging/deck-component-data-api';
}
} else {
return 'https://editorial-tm.staging.newsapis.co.uk/staging/deck-component-data-api';
}
};

0 comments on commit 7d82178

Please sign in to comment.