feat: refactor code structure

This commit is contained in:
Steven
2023-02-23 08:22:06 +08:00
parent f77a84a649
commit 0fbbcae872
36 changed files with 768 additions and 936 deletions

View File

@@ -84,7 +84,7 @@ const Header: React.FC = () => {
<Dropdown
trigger={
<button className="flex flex-row justify-end items-center cursor-pointer">
<span>{user?.name}</span>
<span>{user?.displayName}</span>
<Icon.ChevronDown className="ml-1 w-5 h-auto text-gray-600" />
</button>
}

View File

@@ -50,7 +50,7 @@ const MemberListView: React.FC<Props> = (props: Props) => {
const handleDeleteWorkspaceUserButtonClick = (workspaceUser: WorkspaceUser) => {
showCommonDialog({
title: "Delete Workspace Member",
content: `Are you sure to delete member \`${workspaceUser.name}\` in this workspace?`,
content: `Are you sure to delete member \`${workspaceUser.displayName}\` in this workspace?`,
style: "danger",
onConfirm: async () => {
await deleteWorkspaceUser({
@@ -71,7 +71,7 @@ const MemberListView: React.FC<Props> = (props: Props) => {
return (
<div key={workspaceUser.userId} className="w-full flex flex-row justify-between items-start border px-6 py-4 mb-3 rounded-lg">
<div className="flex flex-row justify-start items-center mr-4">
<span>{workspaceUser.name}</span>
<span>{workspaceUser.displayName}</span>
{currentUser.userId === workspaceUser.userId && <span className="ml-2 text-gray-400">(yourself)</span>}
</div>
<div className="flex flex-row justify-end items-center">

View File

@@ -59,7 +59,7 @@ const ShortcutListView: React.FC<Props> = (props: Props) => {
<span className="text-gray-400 text-sm ml-2">({shortcut.description})</span>
</div>
<div className="flex flex-row justify-end items-center">
<span className="w-16 truncate mr-2 text-gray-600">{shortcut.creator.name}</span>
<span className="w-16 truncate mr-2 text-gray-600">{shortcut.creator.displayName}</span>
<Tooltip title="Copy link" variant="solid" placement="top">
<button
className="cursor-pointer mr-4 hover:opacity-80"