mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-19 21:00:40 +08:00
[Fix] remove support button from user page (#1568)
Remove the support button from user profile pages.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Removed the Support button from user profile pages to simplify actions
and avoid navigating to conversations from this view. Also removed
unused code: the `urlString` import and `useRouter`.
<sup>Written for commit 807112ceec.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1568?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Removed the "Support" action button from user management actions in
the user details page. The remaining user actions such as impersonate,
restrict, and delete remain available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
e15ea932f1
commit
49442cab4b
@ -53,7 +53,6 @@ import { fromNow } from "@hexclave/shared/dist/utils/dates";
|
||||
import { captureError, HexclaveAssertionError, throwErr } from '@hexclave/shared/dist/utils/errors';
|
||||
import { runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises";
|
||||
import { deindent } from "@hexclave/shared/dist/utils/strings";
|
||||
import { urlString } from "@hexclave/shared/dist/utils/urls";
|
||||
import { usePathname, useSearchParams } from "next/navigation";
|
||||
import { Suspense, useCallback, useEffect, useMemo, useRef, useState, type ReactNode, type RefObject } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
@ -115,7 +114,6 @@ function UserHeader({ user }: UserHeaderProps) {
|
||||
const [restrictionDialogOpen, setRestrictionDialogOpen] = useState(false);
|
||||
const [impersonateSnippet, setImpersonateSnippet] = useState<string | null>(null);
|
||||
const hexclaveAdminApp = useAdminApp();
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<div className="flex min-w-0 gap-4 items-center">
|
||||
@ -136,12 +134,6 @@ function UserHeader({ user }: UserHeaderProps) {
|
||||
<p>Last active {fromNow(user.lastActiveAt)}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => router.push(`${urlString`/projects/${hexclaveAdminApp.projectId}/conversations`}?userId=${encodeURIComponent(user.id)}`)}
|
||||
>
|
||||
Support
|
||||
</Button>
|
||||
<DesignMenu
|
||||
variant="actions"
|
||||
trigger="icon"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user