-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Api token management screen (#791)
* Initial API token management in settings * update style to match figma * fix api breaking change * update nav item style and message when api key is copied * update change request * close toast when navigate outside of api management screen * Add save toast, word changes, CSS fix. * update change request * update change request --------- Co-authored-by: ElementalCrisis <9443295+ElementalCrisis@users.noreply.github.com>
- Loading branch information
1 parent
ca846f1
commit 7f75679
Showing
8 changed files
with
234 additions
and
61 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
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,11 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { axiosV2 } from '@/core/axios'; | ||
|
||
import type { AuthToken } from '@/core/types/api/authToken'; | ||
|
||
export const useApiKeyQuery = () => | ||
useQuery<AuthToken[]>({ | ||
queryKey: ['auth', 'apikey'], | ||
queryFn: () => axiosV2.get('auth'), | ||
}); |
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,5 @@ | ||
export type AuthToken = { | ||
UserID: number; | ||
Username: string; | ||
Device: string; | ||
}; |
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
Oops, something went wrong.