Skip to content

Commit 76835db

Browse files
Copilotadameat
andcommitted
Fix tablet page layout: move tablet type back to metadata section
Co-authored-by: adameat <[email protected]>
1 parent 4e2b6c4 commit 76835db

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

src/containers/Tablet/Tablet.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,4 @@
1616
&__loader {
1717
margin-left: var(--g-spacing-2);
1818
}
19-
20-
&__tablet-type {
21-
font-weight: 400;
22-
23-
color: var(--g-color-text-secondary);
24-
@include mixins.text-body-2();
25-
}
2619
}

src/containers/Tablet/Tablet.tsx

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

96-
const {Leader} = tablet;
96+
const {Leader, Type} = 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+
}
101104
if (Leader === false) {
102105
metaItems.push(i18n('tablet.meta-follower').toUpperCase());
103106
}
@@ -132,7 +135,7 @@ function TabletContent({
132135
database?: string;
133136
}) {
134137
const isEmpty = !Object.keys(tablet).length;
135-
const {Overall, HiveId, FollowerId, Type} = tablet;
138+
const {Overall, HiveId, FollowerId} = tablet;
136139

137140
const tabletName = `${id}${FollowerId ? `.${FollowerId}` : ''}`;
138141

@@ -143,14 +146,11 @@ function TabletContent({
143146
isEmpty={isEmpty}
144147
>
145148
<Flex gap={5} direction="column">
146-
<Flex gap={2} direction="column">
147-
<EntityPageTitle
148-
entityName={i18n('tablet.header')}
149-
status={Overall ?? EFlag.Grey}
150-
id={tabletName}
151-
/>
152-
{Type && <div className={b('tablet-type')}>{Type}</div>}
153-
</Flex>
149+
<EntityPageTitle
150+
entityName={i18n('tablet.header')}
151+
status={Overall ?? EFlag.Grey}
152+
id={tabletName}
153+
/>
154154
<TabletControls tablet={tablet} />
155155
<TabletInfo tablet={tablet} />
156156
</Flex>

0 commit comments

Comments
 (0)