Skip to content

Commit

Permalink
feat(content-sidebar): Remove unneeded ref and constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jankowiakdawid committed Jul 18, 2024
1 parent 4cfef1f commit f65408b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/elements/content-sidebar/SidebarPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const LoadableMetadataSidebar = SidebarUtils.getAsyncSidebarContent(
);
const LoadableMetadataSidebarRedesigned = SidebarUtils.getAsyncSidebarContent(
SIDEBAR_VIEW_METADATA_REDESIGN,
MARK_NAME_JS_LOADING_METADATA_REDESIGNED,
MARK_NAME_JS_LOADING_METADATA,
);
const LoadableDocGenSidebar = SidebarUtils.getAsyncSidebarContent(SIDEBAR_VIEW_DOCGEN, MARK_NAME_JS_LOADING_DOCGEN);
const LoadableVersionsSidebar = SidebarUtils.getAsyncSidebarContent(
Expand All @@ -114,8 +114,6 @@ class SidebarPanels extends React.Component<Props, State> {

metadataSidebar: ElementRefType = React.createRef();

metadataSidebarRedesigned: ElementRefType = React.createRef();

state: State = { isInitialized: false };

versionsSidebar: ElementRefType = React.createRef();
Expand Down Expand Up @@ -147,7 +145,6 @@ class SidebarPanels extends React.Component<Props, State> {
const { current: activitySidebar } = this.activitySidebar;
const { current: detailsSidebar } = this.detailsSidebar;
const { current: metadataSidebar } = this.metadataSidebar;
const { current: metadataSidebarRedesigned } = this.metadataSidebarRedesigned;
const { current: versionsSidebar } = this.versionsSidebar;

if (activitySidebar) {
Expand All @@ -162,10 +159,6 @@ class SidebarPanels extends React.Component<Props, State> {
metadataSidebar.refresh();
}

if (metadataSidebarRedesigned) {
metadataSidebarRedesigned.refresh();
}

if (versionsSidebar) {
versionsSidebar.refresh();
}
Expand Down Expand Up @@ -289,7 +282,7 @@ class SidebarPanels extends React.Component<Props, State> {
elementId={elementId}
fileId={fileId}
hasSidebarInitialized={isInitialized}
ref={this.metadataSidebarRedesigned}
ref={this.metadataSidebar}
startMarkName={MARK_NAME_JS_LOADING_METADATA_REDESIGNED}
{...metadataSidebarProps}
/>
Expand Down

0 comments on commit f65408b

Please sign in to comment.