perf: git

This commit is contained in:
archer
2023-08-08 13:30:58 +08:00
parent 3cf38930eb
commit 5fc9041d46
2 changed files with 17 additions and 11 deletions

View File

@@ -41,8 +41,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
Authorization: `Bearer ${access_token}`
}
});
const { login, email, avatar_url } = data;
const username = email || login;
const { login, avatar_url } = data;
const username = `git-${login}`;
try {
jsonRes(res, {

View File

@@ -137,15 +137,21 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
</Button>
{feConfigs?.show_register && (
<Flex mt={10} justifyContent={'center'} alignItems={'center'}>
<MyIcon
name="gitFill"
w={'34px'}
cursor={'pointer'}
color={'myGray.800'}
onClick={onclickGit}
/>
</Flex>
<>
<Flex mt={10} justifyContent={'center'} alignItems={'center'}>
<MyIcon
name="gitFill"
w={'34px'}
cursor={'pointer'}
color={'myGray.800'}
onClick={onclickGit}
/>
</Flex>
<Box mt={3} textAlign={'center'} fontSize={'sm'} color={'myGray.600'}>
Git Git 使 Git
</Box>
</>
)}
</form>
</>