fix: default to feature status entitled to avoid temporarily flashing error
This commit is contained in:
@@ -46,7 +46,7 @@ export const ComponentView: FunctionalComponent<IProps> = observer(
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isReloading, setIsReloading] = useState(false);
|
||||
const [loadTimeout, setLoadTimeout] = useState<number | undefined>(undefined);
|
||||
const [featureStatus, setFeatureStatus] = useState<FeatureStatus | undefined>(undefined);
|
||||
const [featureStatus, setFeatureStatus] = useState<FeatureStatus | undefined>(FeatureStatus.Entitled);
|
||||
const [isComponentValid, setIsComponentValid] = useState(true);
|
||||
const [error, setError] = useState<'offline-restricted' | 'url-missing' | undefined>(undefined);
|
||||
const [isDeprecated, setIsDeprecated] = useState(false);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#tags-column.sn-component.section.tags(aria-label='Tags')
|
||||
.component-view-container(ng-if='self.component.active')
|
||||
.component-view-container(ng-if='self.component && self.component.active')
|
||||
component-view.component-view(
|
||||
component-uuid='self.component.uuid',
|
||||
application='self.application'
|
||||
|
||||
@@ -106,9 +106,9 @@ class TagsViewCtrl extends PureViewCtrl<unknown, TagState> {
|
||||
beginStreamingItems() {
|
||||
this.removeFoldersObserver = this.application.streamItems(
|
||||
[ContentType.Component],
|
||||
async (_items) => {
|
||||
async () => {
|
||||
this.component = this.application.componentManager
|
||||
.componentsForArea(ComponentArea.TagsList)[0];
|
||||
.componentsForArea(ComponentArea.TagsList).find((component) => component.active);
|
||||
});
|
||||
|
||||
this.removeTagsObserver = this.application.streamItems(
|
||||
|
||||
Reference in New Issue
Block a user