From 732a649d3d2feaaf6e780d2f8b4819aa59d993c2 Mon Sep 17 00:00:00 2001 From: wblx <904653630@qq.com> Date: Tue, 30 Jul 2024 14:29:43 +0800 Subject: [PATCH] lol Signed-off-by: wblx <904653630@qq.com> --- src/api/githubApi.ts | 2 -- src/helpers/github-token.ts | 9 ++++----- src/pages/Options/components/GitHubToken.tsx | 4 ---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/api/githubApi.ts b/src/api/githubApi.ts index f395de16..1a5b4925 100644 --- a/src/api/githubApi.ts +++ b/src/api/githubApi.ts @@ -21,5 +21,3 @@ export const githubRequest = async (endpoint: string, options: RequestInit = {}) }; export { saveToken, getToken }; - - diff --git a/src/helpers/github-token.ts b/src/helpers/github-token.ts index 81dc6942..3d649692 100644 --- a/src/helpers/github-token.ts +++ b/src/helpers/github-token.ts @@ -1,8 +1,7 @@ export const saveToken = (token: string) => { - localStorage.setItem('github_token', token); - }; - + localStorage.setItem('github_token', token); +}; + export const getToken = (): string => { -return localStorage.getItem('github_token') || ''; + return localStorage.getItem('github_token') || ''; }; - diff --git a/src/pages/Options/components/GitHubToken.tsx b/src/pages/Options/components/GitHubToken.tsx index 5df6989a..6000cfb4 100644 --- a/src/pages/Options/components/GitHubToken.tsx +++ b/src/pages/Options/components/GitHubToken.tsx @@ -124,7 +124,3 @@ const GitHubToken = () => { }; export default GitHubToken; - - - -