Skip to content

Commit

Permalink
Merge pull request #252 from aevo98765/ux/#172/auto-populate-email-us…
Browse files Browse the repository at this point in the history
…ername-from-github-login

Adding the auto-populate for the username and user email.
  • Loading branch information
aevo98765 authored Oct 15, 2024
2 parents b501719 + b53839e commit 799de87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Contribute/Knowledge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ export const KnowledgeForm: React.FunctionComponent<KnowledgeFormProps> = ({ kno
getEnvVariables();
}, []);

useEffect(() => {
if (session?.user?.name && session?.user?.email) {
setName(session?.user?.name);
setEmail(session?.user?.email);
}
}, [session?.user]);

useMemo(() => {
const fetchUsername = async () => {
if (session?.accessToken) {
Expand Down

0 comments on commit 799de87

Please sign in to comment.