Add that thing

This commit is contained in:
2026-03-20 13:50:02 -05:00
parent d2eea9880a
commit 81e6a5aaa6

View File

@@ -51,6 +51,10 @@ export const UserInfoForm = ({
}: UserInfoFormProps) => {
const user = usePreloadedQuery(preloadedUser);
const userProvider = usePreloadedQuery(preloadedProvider);
const providerMap: Record<string, string> = {
unknown: 'Provider',
authentik: 'Gib\'s Auth'
};
const [loading, setLoading] = useState(false);
const updateUser = useMutation(api.auth.updateUser);
@@ -137,16 +141,16 @@ export const UserInfoForm = ({
{...field}
type='email'
placeholder='john@example.com'
disabled={userProvider !== 'email'}
disabled={userProvider !== 'password'}
/>
</FormControl>
{userProvider === 'email' ? (
{userProvider === 'password' ? (
<FormDescription>
Your email address for account notifications
</FormDescription>
) : (
<FormDescription>
Email is managed through your {userProvider} account
Email is managed through your {providerMap[userProvider ?? 'unknown']} account
</FormDescription>
)}
<FormMessage />
@@ -164,3 +168,4 @@ export const UserInfoForm = ({
</>
);
};