Skip to content

Commit 6471ca2

Browse files
authored
feat: remove Account settings button from Profile settings (#26)
* feat: remove Profile settings button from Credential settings
1 parent 0d82d62 commit 6471ca2

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

apps/next/components/user/credentials-form.tsx

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client"
22

33
import * as React from "react"
4-
import Link from "next/link"
54
import { zodResolver } from "@hookform/resolvers/zod"
65
import { CircleIcon, CrossCircledIcon } from "@radix-ui/react-icons"
76
import { useMutation } from "@tanstack/react-query"
@@ -154,17 +153,10 @@ const CredentialsFormComponent: React.FC<{
154153
</AlertDescription>
155154
</Alert>
156155
)}
157-
<footer className="flex flex-col gap-2 sm:flex-row">
158-
<Button type="submit" disabled={isPending}>
159-
{isPending && (
160-
<CircleIcon className="mr-2 size-4 animate-spin" />
161-
)}
162-
Update Settings
163-
</Button>
164-
<Button asChild variant="link">
165-
<Link href="/settings/profile">Profile Settings</Link>
166-
</Button>
167-
</footer>
156+
<Button type="submit" disabled={isPending}>
157+
{isPending && <CircleIcon className="mr-2 size-4 animate-spin" />}
158+
Update Settings
159+
</Button>
168160
</form>
169161
</Form>
170162
</CardContent>

apps/next/components/user/profile-form.tsx

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client"
22

33
import * as React from "react"
4-
import Link from "next/link"
54
import { zodResolver } from "@hookform/resolvers/zod"
65
import {
76
CircleIcon,
@@ -258,17 +257,10 @@ const ProfileFormComponent: React.FC<{
258257
</AlertDescription>
259258
</Alert>
260259
)}
261-
<footer className="flex flex-col gap-2 sm:flex-row">
262-
<Button type="submit" disabled={isPending}>
263-
{isPending && (
264-
<CircleIcon className="mr-2 size-4 animate-spin" />
265-
)}
266-
Update Settings
267-
</Button>
268-
<Button asChild variant="link">
269-
<Link href="/settings/account">Account Settings</Link>
270-
</Button>
271-
</footer>
260+
<Button type="submit" disabled={isPending}>
261+
{isPending && <CircleIcon className="mr-2 size-4 animate-spin" />}
262+
Update Settings
263+
</Button>
272264
</form>
273265
</Form>
274266
</CardContent>

0 commit comments

Comments
 (0)