mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* metadata helpers and values for txs pages * update titles to the rest of the pages * refactor getServerSideProps * dynamically update metadata for token and dapp page * test * 404 error page * make new config * make use of new config, delete old one * feature reporter: dev implementation * feature reporter: docker integration * resctructure ENVS.md * sentry feature * refinements * add spaces between sections * tweaks * switch to camelCase * clean up * remove NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS * v
16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
import config from 'configs/app';
|
|
import { useAppContext } from 'lib/contexts/app';
|
|
import * as cookies from 'lib/cookies';
|
|
|
|
export default function useHasAccount() {
|
|
const appProps = useAppContext();
|
|
|
|
if (!config.features.account.isEnabled) {
|
|
return false;
|
|
}
|
|
|
|
const cookiesString = appProps.cookies;
|
|
const hasAuth = Boolean(cookies.get(cookies.NAMES.API_TOKEN, cookiesString));
|
|
return hasAuth;
|
|
}
|