1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2 | // SPDX-License-Identifier: Apache-2.0
|
3 | import { browserOrNode } from '@aws-amplify/core';
|
4 | export default (function (callback) {
|
5 | if (browserOrNode().isBrowser && window.location) {
|
6 | var url = window.location.href;
|
7 | callback({ url: url });
|
8 | }
|
9 | else if (browserOrNode().isNode) {
|
10 | // continue building on ssr
|
11 | (function () { }); // noop
|
12 | }
|
13 | else {
|
14 | throw new Error('Not supported');
|
15 | }
|
16 | });
|
17 | //# sourceMappingURL=urlListener.js.map |
\ | No newline at end of file |