-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* placeholders for address and txs * placeholder for explorer link * move phalcon link * change api endpoint for demo * Fixing upstream header too large * ready flags and navigation events * add ENV --------- Co-authored-by: Nick Zenchik <[email protected]>
- Loading branch information
Showing
14 changed files
with
121 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Feature } from './types'; | ||
|
||
import { getEnvValue } from '../utils'; | ||
|
||
const title = 'MetaSuites extension'; | ||
|
||
const config: Feature<{ isEnabled: true }> = (() => { | ||
if (getEnvValue('NEXT_PUBLIC_METASUITES_ENABLED') === 'true') { | ||
return Object.freeze({ | ||
title, | ||
isEnabled: true, | ||
}); | ||
} | ||
|
||
return Object.freeze({ | ||
title, | ||
isEnabled: false, | ||
}); | ||
})(); | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { usePathname } from 'next/navigation'; | ||
import { useRouter } from 'next/router'; | ||
import React from 'react'; | ||
|
||
import config from 'configs/app'; | ||
import getQueryParamString from 'lib/router/getQueryParamString'; | ||
|
||
export default function useNotifyOnNavigation() { | ||
const router = useRouter(); | ||
const pathname = usePathname(); | ||
const tab = getQueryParamString(router.query.tab); | ||
|
||
React.useEffect(() => { | ||
if (config.features.metasuites.isEnabled) { | ||
window.postMessage({ source: 'APP_ROUTER', type: 'PATHNAME_CHANGED' }, window.location.origin); | ||
} | ||
}, [ pathname ]); | ||
|
||
React.useEffect(() => { | ||
if (config.features.metasuites.isEnabled) { | ||
window.postMessage({ source: 'APP_ROUTER', type: 'TAB_CHANGED' }, window.location.origin); | ||
} | ||
}, [ tab ]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters