Skip to content

Commit 6e6e51d

Browse files
author
Rajat Saxena
committed
Lint fix
1 parent a94454d commit 6e6e51d

File tree

1 file changed

+62
-56
lines changed
  • apps/web/app/(with-contexts)/dashboard/(sidebar)/product/[id]/customers

1 file changed

+62
-56
lines changed

apps/web/app/(with-contexts)/dashboard/(sidebar)/product/[id]/customers/page.tsx

Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function CustomersPage() {
7575
const address = useContext(AddressContext);
7676
const { product } = useProduct(productId, address);
7777
const { toast } = useToast();
78-
const {profile} = useContext(ProfileContext)
78+
const { profile } = useContext(ProfileContext);
7979
const [isUpdating, setIsUpdating] = useState(false);
8080

8181
const breadcrumbs = [
@@ -322,30 +322,25 @@ export default function CustomersPage() {
322322
href={`/dashboard/users/${member.user.userId}`}
323323
>
324324
<div className="flex items-center space-x-2">
325-
<Avatar className="h-8 w-8">
326-
<AvatarImage
327-
src={
328-
member.user
329-
.avatar
330-
?.thumbnail ||
331-
"/courselit_backdrop_square.webp"
332-
}
333-
alt={
334-
member.user
335-
.name ||
336-
member.user
337-
.email
338-
}
339-
/>
340-
<AvatarFallback>
341-
{(
342-
member.user
343-
.name ||
344-
member.user
345-
.email
346-
).charAt(0)}
347-
</AvatarFallback>
348-
</Avatar>
325+
<Avatar className="h-8 w-8">
326+
<AvatarImage
327+
src={
328+
member.user.avatar
329+
?.thumbnail ||
330+
"/courselit_backdrop_square.webp"
331+
}
332+
alt={
333+
member.user.name ||
334+
member.user.email
335+
}
336+
/>
337+
<AvatarFallback>
338+
{(
339+
member.user.name ||
340+
member.user.email
341+
).charAt(0)}
342+
</AvatarFallback>
343+
</Avatar>
349344
{/* <Avatar className="h-8 w-8">
350345
<AvatarImage
351346
src={
@@ -374,25 +369,25 @@ export default function CustomersPage() {
374369
{/* <TableCell>
375370
{member.status}
376371
</TableCell> */}
377-
<TableCell>
378-
<div className="flex items-center space-x-2">
379-
<Badge
380-
variant={
381-
member.status.toLowerCase() ===
382-
"pending"
383-
? "success"
384-
: member.status.toLowerCase() ===
385-
"active"
386-
? "default"
387-
: "destructive"
388-
}
389-
>
390-
{member.status
391-
.charAt(0)
392-
.toUpperCase() +
393-
member.status.slice(1)}
394-
</Badge>
395-
{/* {member.user.userId !==
372+
<TableCell>
373+
<div className="flex items-center space-x-2">
374+
<Badge
375+
variant={
376+
member.status.toLowerCase() ===
377+
"pending"
378+
? "success"
379+
: member.status.toLowerCase() ===
380+
"active"
381+
? "default"
382+
: "destructive"
383+
}
384+
>
385+
{member.status
386+
.charAt(0)
387+
.toUpperCase() +
388+
member.status.slice(1)}
389+
</Badge>
390+
{/* {member.user.userId !==
396391
profile.userId && (
397392
<Tooltip title="Change status">
398393
<Button
@@ -411,8 +406,8 @@ export default function CustomersPage() {
411406
</Button>
412407
</Tooltip>
413408
)} */}
414-
</div>
415-
</TableCell>
409+
</div>
410+
</TableCell>
416411
<TableCell>
417412
{product?.type?.toLowerCase() ===
418413
Constants.CourseType.COURSE ? (
@@ -441,8 +436,15 @@ export default function CustomersPage() {
441436
<DialogContent>
442437
<DialogHeader>
443438
<DialogTitle>
444-
{truncate( member.user.name ||
445-
member.user.email, 10)}
439+
{truncate(
440+
member
441+
.user
442+
.name ||
443+
member
444+
.user
445+
.email,
446+
10,
447+
)}
446448
&apos;s
447449
Progress
448450
</DialogTitle>
@@ -504,21 +506,25 @@ export default function CustomersPage() {
504506
</TableCell>
505507
<TableCell>
506508
<div className="flex items-center gap-2">
507-
<Tooltip title={`Method: ${capitalize(member.subscriptionMethod || "")}`}>
508-
{member.subscriptionId
509-
? truncate(
510-
member.subscriptionId,
511-
10,
512-
)
513-
: "-"}</Tooltip>
509+
<Tooltip
510+
title={`Method: ${capitalize(member.subscriptionMethod || "")}`}
511+
>
512+
{member.subscriptionId
513+
? truncate(
514+
member.subscriptionId,
515+
10,
516+
)
517+
: "-"}
518+
</Tooltip>
514519
{member.subscriptionId && (
515520
<Tooltip title="Copy Subscription ID">
516521
<Button
517522
size="sm"
518523
variant="outline"
519524
onClick={() =>
520525
handleCopyToClipboard(
521-
member.subscriptionId || ""
526+
member.subscriptionId ||
527+
"",
522528
)
523529
}
524530
>

0 commit comments

Comments
 (0)