Skip to content

Commit 9bd2b0f

Browse files
refactor: apply prettier fixes
1 parent dc13307 commit 9bd2b0f

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

src/containers/Tenant/ObjectSummary/ObjectSummary.tsx

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,22 @@ function ObjectSummary(props: ObjectSummaryProps) {
104104
});
105105

106106
const {name: tenantName, info: infoTab} = queryParams;
107-
const pathData: TDirEntry | undefined = _.get(data[tenantName as string], 'PathDescription.Self');
108-
const currentSchemaData: TDirEntry | undefined = _.get(data[currentSchemaPath], 'PathDescription.Self');
107+
const pathData: TDirEntry | undefined = _.get(
108+
data[tenantName as string],
109+
'PathDescription.Self',
110+
);
111+
const currentSchemaData: TDirEntry | undefined = _.get(
112+
data[currentSchemaPath],
113+
'PathDescription.Self',
114+
);
109115

110116
const tableSchema =
111117
currentItem?.PathDescription?.Table || currentItem?.PathDescription?.ColumnTableDescription;
112118

113-
const schema = isTableType(props.type) && isColumnEntityType(props.type)
114-
? prepareOlapTableSchema(tableSchema)
115-
: tableSchema;
119+
const schema =
120+
isTableType(props.type) && isColumnEntityType(props.type)
121+
? prepareOlapTableSchema(tableSchema)
122+
: tableSchema;
116123

117124
useEffect(() => {
118125
const {type} = props;
@@ -166,11 +173,16 @@ function ObjectSummary(props: ObjectSummaryProps) {
166173
[EPathType.EPathTypeExtSubDomain]: undefined,
167174
[EPathType.EPathTypeColumnStore]: undefined,
168175
[EPathType.EPathTypeColumnTable]: undefined,
169-
[EPathType.EPathTypeCdcStream]: () => <CDCStreamOverview data={data[currentSchemaPath]} />,
170-
[EPathType.EPathTypePersQueueGroup]: () => <PersQueueGroupOverview data={data[currentSchemaPath]} />,
176+
[EPathType.EPathTypeCdcStream]: () => (
177+
<CDCStreamOverview data={data[currentSchemaPath]} />
178+
),
179+
[EPathType.EPathTypePersQueueGroup]: () => (
180+
<PersQueueGroupOverview data={data[currentSchemaPath]} />
181+
),
171182
};
172183

173-
let component = currentSchemaData?.PathType && pathTypeToComponent[currentSchemaData.PathType]?.();
184+
let component =
185+
currentSchemaData?.PathType && pathTypeToComponent[currentSchemaData.PathType]?.();
174186

175187
if (!component) {
176188
const startTimeInMilliseconds = Number(currentSchemaData?.CreateStep);
@@ -182,11 +194,7 @@ function ObjectSummary(props: ObjectSummaryProps) {
182194
component = <InfoViewer info={[{label: 'Create time', value: createTime}]} />;
183195
}
184196

185-
return (
186-
<div className={b('overview-wrapper')}>
187-
{component}
188-
</div>
189-
);
197+
return <div className={b('overview-wrapper')}>{component}</div>;
190198
};
191199

192200
const renderTabContent = () => {

src/containers/Tenant/utils/schema.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const pathTypeToNodeType: Record<EPathType, NavigationTreeNodeType | undefined>
3535
export const mapPathTypeToNavigationTreeType = (
3636
type: EPathType = EPathType.EPathTypeDir,
3737
subType?: EPathSubType,
38-
defaultType: NavigationTreeNodeType = 'directory'
38+
defaultType: NavigationTreeNodeType = 'directory',
3939
): NavigationTreeNodeType =>
4040
(subType && pathSubTypeToNodeType[subType]) || pathTypeToNodeType[type] || defaultType;
4141

@@ -87,5 +87,4 @@ const pathTypeToIsColumn: Record<EPathType, boolean> = {
8787
[EPathType.EPathTypePersQueueGroup]: false,
8888
};
8989

90-
export const isColumnEntityType = (type?: EPathType) =>
91-
(type && pathTypeToIsColumn[type]) ?? false;
90+
export const isColumnEntityType = (type?: EPathType) => (type && pathTypeToIsColumn[type]) ?? false;

0 commit comments

Comments
 (0)