optimize fm (#82)

* optimize fm

* chore: auto-fix linting and formatting issues

* fix: type

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
Co-authored-by: naiba <hi@nai.ba>
Co-authored-by: naiba <naiba@users.noreply.github.com>
This commit is contained in:
UUBulb
2024-12-29 22:19:50 +08:00
committed by GitHub
co-authored by uubulb naiba naiba
parent 718bff0abb
commit 18c832d553
12 changed files with 164 additions and 120 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { getOauth2RedirectURL, Oauth2RequestType } from "@/api/oauth2"
import { Oauth2RequestType, getOauth2RedirectURL } from "@/api/oauth2"
import { Button } from "@/components/ui/button"
import {
Form,
@@ -59,7 +59,7 @@ function Login() {
window.location.href = redirectUrl.redirect!
} catch (error: any) {
toast.error(error.message)
}
}
}
const { t } = useTranslation()
@@ -103,9 +103,9 @@ function Login() {
</form>
</Form>
<div className="mt-4">
{settingData?.config?.oauth2_providers?.map((p: string) =>
{settingData?.config?.oauth2_providers?.map((p: string) => (
<Button onClick={() => loginWith(p)}>{p}</Button>
)}
))}
</div>
</div>
)