Skip to content

Commit

Permalink
feat: remove Account settings button from Profile settings (#26)
Browse files Browse the repository at this point in the history
* feat: remove Profile settings button from Credential settings
  • Loading branch information
rudokotrla authored Apr 22, 2024
1 parent 0d82d62 commit 6471ca2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
16 changes: 4 additions & 12 deletions apps/next/components/user/credentials-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client"

import * as React from "react"
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { CircleIcon, CrossCircledIcon } from "@radix-ui/react-icons"
import { useMutation } from "@tanstack/react-query"
Expand Down Expand Up @@ -154,17 +153,10 @@ const CredentialsFormComponent: React.FC<{
</AlertDescription>
</Alert>
)}
<footer className="flex flex-col gap-2 sm:flex-row">
<Button type="submit" disabled={isPending}>
{isPending && (
<CircleIcon className="mr-2 size-4 animate-spin" />
)}
Update Settings
</Button>
<Button asChild variant="link">
<Link href="/settings/profile">Profile Settings</Link>
</Button>
</footer>
<Button type="submit" disabled={isPending}>
{isPending && <CircleIcon className="mr-2 size-4 animate-spin" />}
Update Settings
</Button>
</form>
</Form>
</CardContent>
Expand Down
16 changes: 4 additions & 12 deletions apps/next/components/user/profile-form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client"

import * as React from "react"
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import {
CircleIcon,
Expand Down Expand Up @@ -258,17 +257,10 @@ const ProfileFormComponent: React.FC<{
</AlertDescription>
</Alert>
)}
<footer className="flex flex-col gap-2 sm:flex-row">
<Button type="submit" disabled={isPending}>
{isPending && (
<CircleIcon className="mr-2 size-4 animate-spin" />
)}
Update Settings
</Button>
<Button asChild variant="link">
<Link href="/settings/account">Account Settings</Link>
</Button>
</footer>
<Button type="submit" disabled={isPending}>
{isPending && <CircleIcon className="mr-2 size-4 animate-spin" />}
Update Settings
</Button>
</form>
</Form>
</CardContent>
Expand Down

0 comments on commit 6471ca2

Please sign in to comment.