Skip to content

Commit 1776ee8

Browse files
author
Theodore Li
committed
Fix lint
1 parent d53a41f commit 1776ee8

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

apps/sim/app/workspace/[workspaceId]/impersonation-banner.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { useState } from 'react'
44
import { Banner } from '@/components/emcn'
5-
import { useStopImpersonating } from '@/hooks/queries/admin-users'
65
import { useSession } from '@/lib/auth/auth-client'
6+
import { useStopImpersonating } from '@/hooks/queries/admin-users'
77

88
function getImpersonationBannerText(userLabel: string, userEmail?: string) {
99
return `Impersonating ${userLabel}${userEmail ? ` (${userEmail})` : ''}. Changes will apply to this account until you switch back.`
@@ -25,7 +25,9 @@ export function ImpersonationBanner() {
2525
variant='destructive'
2626
text={getImpersonationBannerText(userLabel, userEmail)}
2727
textClassName='text-red-700 dark:text-red-300'
28-
actionLabel={stopImpersonating.isPending || isRedirecting ? 'Returning...' : 'Stop impersonating'}
28+
actionLabel={
29+
stopImpersonating.isPending || isRedirecting ? 'Returning...' : 'Stop impersonating'
30+
}
2931
actionVariant='destructive'
3032
actionDisabled={stopImpersonating.isPending || isRedirecting}
3133
onAction={() =>

apps/sim/app/workspace/[workspaceId]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ToastProvider } from '@/components/emcn'
2-
import { GlobalCommandsProvider } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
32
import { ImpersonationBanner } from '@/app/workspace/[workspaceId]/impersonation-banner'
3+
import { GlobalCommandsProvider } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
44
import { ProviderModelsLoader } from '@/app/workspace/[workspaceId]/providers/provider-models-loader'
55
import { SettingsLoader } from '@/app/workspace/[workspaceId]/providers/settings-loader'
66
import { WorkspacePermissionsProvider } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'

apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ export function Admin() {
254254
onClick={() => handleImpersonate(u.id)}
255255
disabled={pendingUserIds.has(u.id)}
256256
>
257-
{(impersonatingUserId === u.id ||
258-
(impersonateUser.isPending &&
259-
(impersonateUser.variables as { userId?: string } | undefined)
260-
?.userId === u.id))
257+
{impersonatingUserId === u.id ||
258+
(impersonateUser.isPending &&
259+
(impersonateUser.variables as { userId?: string } | undefined)
260+
?.userId === u.id)
261261
? 'Switching...'
262262
: 'Impersonate'}
263263
</Button>

apps/sim/components/emcn/components/banner/banner.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import type { HTMLAttributes, ReactNode } from 'react'
44
import { cva, type VariantProps } from 'class-variance-authority'
5-
import { cn } from '@/lib/core/utils/cn'
65
import { Button, type ButtonProps } from '@/components/emcn/components/button/button'
6+
import { cn } from '@/lib/core/utils/cn'
77

88
const bannerVariants = cva('shrink-0 px-[24px] py-[10px]', {
99
variants: {
@@ -50,7 +50,12 @@ export function Banner({
5050
return (
5151
<div className={cn(bannerVariants({ variant }), className)} {...props}>
5252
{children ?? (
53-
<div className={cn('mx-auto flex max-w-[1400px] items-center justify-between gap-[12px]', contentClassName)}>
53+
<div
54+
className={cn(
55+
'mx-auto flex max-w-[1400px] items-center justify-between gap-[12px]',
56+
contentClassName
57+
)}
58+
>
5459
<p className={cn('text-[13px]', textClassName)}>{text}</p>
5560
{actionLabel ? (
5661
<Button

apps/sim/components/emcn/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export {
66
avatarStatusVariants,
77
avatarVariants,
88
} from './avatar/avatar'
9-
export { Banner, type BannerProps } from './banner/banner'
109
export { Badge } from './badge/badge'
10+
export { Banner, type BannerProps } from './banner/banner'
1111
export { Breadcrumb, type BreadcrumbItem, type BreadcrumbProps } from './breadcrumb/breadcrumb'
1212
export { Button, type ButtonProps, buttonVariants } from './button/button'
1313
export {

0 commit comments

Comments
 (0)