Skip to content

Commit

Permalink
Merge pull request #35 from digital-asset/bump-1-0-1
Browse files Browse the repository at this point in the history
Tune down logging levels to debug when inferring app environment
  • Loading branch information
alexmatson-da authored Jan 7, 2022
2 parents fb4a28e + 034654c commit f27c5cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daml/hub-react",
"version": "1.0.0",
"version": "1.0.1",
"description": "Daml React functions for Daml Hub",
"homepage": "https://hub.daml.com",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export const detectAppDomainType = (): DomainType => {
const { hostname: hn } = window.location;

if (hn.includes('projectdabl') && hn.includes('.com')) {
log('domain').info('App running on legacy projectdabl.com domain');
log('domain').debug('App running on legacy projectdabl.com domain');
return DomainType.LEGACY_DOMAIN;
} else if (hn.includes('daml') && hn.includes('.app')) {
log('domain').info('App running on daml.app domain');
log('domain').debug('App running on daml.app domain');
return DomainType.APP_DOMAIN;
} else {
log('domain').warn('App UI does not seem to be running on Daml Hub');
log('domain').debug('App UI does not seem to be running on Daml Hub');
return DomainType.NON_HUB_DOMAIN;
}
};
Expand Down Expand Up @@ -115,7 +115,7 @@ export const asyncFileReader = (file: File): Promise<string> => {
export const usePolling = (fn: () => Promise<void>, interval: number) => {
React.useEffect(() => {
if (!isRunningOnHub()) {
log('polling').warn('Disabling polling, app is not running on Daml Hub');
log('polling').debug('Disabling polling, app is not running on Daml Hub');
return () => {};
} else if (interval > 0) {
let intervalID = setInterval(fn, interval);
Expand Down

0 comments on commit f27c5cb

Please sign in to comment.