This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add NEXT_PUBLIC_LOCAL_USER flag (#136)
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
NEXT_PUBLIC_API_URL=https://api.ironfish.network | ||
API_URL=https://api.ironfish.network | ||
NEXT_PUBLIC_MAGIC_PUBLISHABLE_KEY=test | ||
NEXT_PUBLIC_LOCAL_USER=true |
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 |
---|---|---|
|
@@ -136,4 +136,39 @@ export function useLogin(config: LoginProps = {}) { | |
|
||
export type LoginContext = ReturnType<typeof useLogin> | ||
|
||
export const useLocalLogin = () => ({ | ||
checkLoggedIn: () => true, | ||
checkLoading: () => false, | ||
checkFailed: () => false, | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
setError: () => {}, | ||
error: '', | ||
status: STATUS.LOADED, | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
setStatus: () => {}, | ||
metadata: { | ||
id: 111, | ||
created_at: '2021-10-30T23:28:59.505Z', | ||
updated_at: '2021-10-30T23:43:28.555Z', | ||
email: '[email protected]', | ||
graffiti: 'cooldev', | ||
total_points: 1100, | ||
country_code: 'USA', | ||
email_notifications: false, | ||
last_login_at: '2021-10-30T23:29:49.101Z', | ||
discord: 'coolcooldev', | ||
telegram: '', | ||
confirmation_token: '01FNSJW53E9J029SKXYA2020KN', | ||
confirmed_at: '2021-10-30T23:43:28.554Z', | ||
github: '', | ||
}, | ||
magicMetadata: { | ||
issuer: 'did:ethr:0xFfcD8602De681449Fa70C304096a84e014Fa123C', | ||
publicAddress: '0xFfcD8602De681449Fa70C304096a84e014Fa123C', | ||
email: '[email protected]', | ||
isMfaEnabled: false, | ||
phoneNumber: null, | ||
}, | ||
}) | ||
|
||
export default useLogin |
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
286db77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: