Skip to content

Commit

Permalink
perf: index primary key comp.
Browse files Browse the repository at this point in the history
  • Loading branch information
riccox committed Oct 10, 2024
1 parent 9611b24 commit 444c434
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/indexPrimaryKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export const IndexPrimaryKey = ({ afterMutation }: Props) => {
return (
<>
<div flex gap-1 items-center>
<Copyable>{currentIndex.index.primaryKey as string}</Copyable>
{currentIndex.index.primaryKey ? (
<Copyable>{currentIndex.index.primaryKey as string}</Copyable>
) : (
t('common:none')
)}
<div
className="i-lucide:edit w-1em h-1em cursor-pointer hover:scale-90 transition"
onClick={() => {
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"status": "Status",
"dashboard": "Dashboard",
"version": "Version",
"none": "None",
"toast": {
"fail": "Failed, {{msg}}"
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"status": "状态",
"dashboard": "仪表盘",
"version": "版本",
"none": "暂无",
"toast": {
"fail": "失败, {{msg}}"
}
Expand Down

0 comments on commit 444c434

Please sign in to comment.