Skip to content

Commit

Permalink
Merge branch 'main' into feature/disable-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
jitu5 authored May 29, 2024
2 parents 46dbf28 + 6b83643 commit 20bbe47
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,12 @@ export const formatNumberWithCommas = (number) => {
* @returns {Boolean} True if the app is running locally.
*/
export const isRunningLocally = () => {
const hosts = ['localhost', '127.0.0.1', 'demo.kedro.org'];
const itemFoundIndex = hosts.indexOf(window.location.hostname);
const hosts = ['localhost', '127.0.0.1', 'demo.kedro.org', 'gitpod'];
const itemFound = hosts.some((host) =>
window.location.hostname.includes(host)
);

if (itemFoundIndex === -1) {
return false; // The hostname isn't in our list of local hosts
} else {
return true;
}
return itemFound;
};

/**
Expand Down

0 comments on commit 20bbe47

Please sign in to comment.