Skip to content

Commit 14a9cff

Browse files
committed
chore: minor cleanups
1 parent ecde713 commit 14a9cff

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

src/components/modals/index.ts

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

33
import { createPushModal } from "pushmodal";
44
import { ShareClassModal } from "./share-class-modal";
5+
import { ShareDataRoomModal } from "./share-dataroom-modal";
6+
import { ShareUpdateModal } from "./share-update-modal";
57
import { SingleStakeholdersModal } from "./stakeholder/single-stake-holder-modal";
68
import { TeamMemberModal } from "./team-member/team-member-modal";
79
import { WipModal } from "./wip-modal";
8-
import { ShareUpdateModal } from "./share-update-modal";
9-
import { ShareDataRoomModal } from "./share-dataroom-modal";
1010

1111
export const { pushModal, popModal, ModalProvider } = createPushModal({
1212
modals: {
@@ -18,4 +18,3 @@ export const { pushModal, popModal, ModalProvider } = createPushModal({
1818
ShareDataRoomModal,
1919
},
2020
});
21-

src/components/modals/stakeholder/single-stake-holder-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const SingleStakeholderForm = () => {
129129
name="currentRelationship"
130130
render={({ field }) => (
131131
<FormItem>
132-
<FormLabel>Association</FormLabel>
132+
<FormLabel>Group</FormLabel>
133133
<Select onValueChange={field.onChange}>
134134
<FormControl>
135135
<SelectTrigger className="w-full">

src/components/ui/badge.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ const badgeVariants = cva(
1414
secondary:
1515
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
1616
warning: "border-transparent bg-yellow-50 text-yellow-800",
17-
success: "border-transparent bg-teal-50 text-teal-800",
18-
destructive:
19-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17+
success: "border-transparent bg-green-50 text-green-800",
18+
destructive: "border-transparent bg-red-50 text-red-800",
2019
outline: "text-foreground",
2120
},
2221
},

src/components/update/change-update-visibility-alert-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export function ChangeUpdateVisibilityAlertDialog({
9898
</AlertDialogTitle>
9999
<AlertDialogDescription>
100100
{isPublic
101-
? "Making update private prevents users to view."
102-
: "Sharing the update allows public users to view"}
101+
? "Making it private prevents public users from accessing it."
102+
: "Publicly sharing this update allows public users to view it, it may also be indexed by search engines."}
103103
</AlertDialogDescription>
104104
</AlertDialogHeader>
105105
<AlertDialogFooter>

src/components/update/update-table.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const getUpdateStatus = (status: string) => {
5050
case "PUBLIC":
5151
return <Badge variant="success">Public</Badge>;
5252
case "PRIVATE":
53-
return <Badge variant="outline">Private</Badge>;
53+
return <Badge variant="destructive">Private</Badge>;
5454
}
5555
};
5656

@@ -83,22 +83,6 @@ const UpdateActions = (row: { original: Update[number] }) => {
8383
</DropdownMenuItem>
8484
)}
8585

86-
<DropdownMenuItem
87-
asChild
88-
onClick={() => {
89-
pushModal("ShareUpdateModal", {
90-
update: {
91-
id: updateId,
92-
publicId: updatePublicId,
93-
},
94-
});
95-
}}
96-
>
97-
<div className="relative hover:bg-gray-100 flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50">
98-
Share this update
99-
</div>
100-
</DropdownMenuItem>
101-
10286
{status !== "DRAFT" && (
10387
<DropdownMenuItem asChild>
10488
<ChangeUpdateVisibilityAlertDialog
@@ -114,6 +98,22 @@ const UpdateActions = (row: { original: Update[number] }) => {
11498
/>
11599
</DropdownMenuItem>
116100
)}
101+
102+
<DropdownMenuItem
103+
asChild
104+
onClick={() => {
105+
pushModal("ShareUpdateModal", {
106+
update: {
107+
id: updateId,
108+
publicId: updatePublicId,
109+
},
110+
});
111+
}}
112+
>
113+
<div className="relative hover:bg-gray-100 flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50">
114+
Share this update
115+
</div>
116+
</DropdownMenuItem>
117117
</DropdownMenuContent>
118118
</DropdownMenu>
119119
);

0 commit comments

Comments
 (0)