Skip to content

Commit 2f67caf

Browse files
committed
committing review suggestions
1 parent c6ed639 commit 2f67caf

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

plugins/confluence-plugin/src/components/PageContent.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ const PageContent: React.FC = () => {
3636
);
3737

3838
const entityPages = useMemo((): EntityPageI[] => {
39-
if (!entityDefinition) return [];
39+
if (!entityDefinition) {
40+
return [];
41+
}
4042
const entityPages: EntityPageI[] = [];
43+
4144
if (Array.isArray(entityDefinition.info?.["x-cortex-confluence"]?.pages)) {
4245
for (const page of entityDefinition.info["x-cortex-confluence"].pages) {
4346
const id = page.id as string;
@@ -47,6 +50,7 @@ const PageContent: React.FC = () => {
4750
}
4851
}
4952
}
53+
5054
if (entityDefinition.info?.["x-cortex-confluence"]?.pageID) {
5155
entityPages.push({
5256
id: `${entityDefinition.info["x-cortex-confluence"].pageID as string}`,
@@ -79,9 +83,17 @@ const PageContent: React.FC = () => {
7983
}
8084
}, [context.entity?.tag]);
8185

82-
if (isLoading) return <Loading />;
83-
if (!baseConfluenceUrl) return <Instructions />;
84-
if (errorStr) return <Notice>{errorStr}</Notice>;
86+
if (isLoading) {
87+
return <Loading />;
88+
}
89+
90+
if (!baseConfluenceUrl) {
91+
return <Instructions />;
92+
}
93+
94+
if (errorStr) {
95+
return <Notice>{errorStr}</Notice>;
96+
}
8597

8698
if (isNil(entityPage)) {
8799
return (

0 commit comments

Comments
 (0)