Skip to content

Commit ac9bc21

Browse files
Copilotadameat
andauthored
feat(tablet): improve tablet page layout: swap places type and title (#2581)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: adameat <[email protected]>
1 parent fc0d555 commit ac9bc21

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/containers/Tablet/Tablet.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,13 @@ export function Tablet() {
9393
);
9494
}, [dispatch, queryDatabase, id, tabletType]);
9595

96-
const {Leader, Type} = tablet;
96+
const {Leader} = tablet;
9797
const metaItems: string[] = [];
9898
if (database) {
9999
metaItems.push(`${i18n('tablet.meta-database')}: ${database}`);
100100
}
101-
if (Type) {
102-
metaItems.push(Type);
103-
}
101+
// Add "Tablet" instead of tablet type to metadata
102+
metaItems.push(i18n('tablet.header'));
104103
if (Leader === false) {
105104
metaItems.push(i18n('tablet.meta-follower').toUpperCase());
106105
}
@@ -135,7 +134,7 @@ function TabletContent({
135134
database?: string;
136135
}) {
137136
const isEmpty = !Object.keys(tablet).length;
138-
const {Overall, HiveId, FollowerId} = tablet;
137+
const {Overall, HiveId, FollowerId, Type} = tablet;
139138

140139
const tabletName = `${id}${FollowerId ? `.${FollowerId}` : ''}`;
141140

@@ -147,7 +146,7 @@ function TabletContent({
147146
>
148147
<Flex gap={5} direction="column">
149148
<EntityPageTitle
150-
entityName={i18n('tablet.header')}
149+
entityName={Type || i18n('tablet.header')}
151150
status={Overall ?? EFlag.Grey}
152151
id={tabletName}
153152
/>

0 commit comments

Comments
 (0)