Skip to content

Commit

Permalink
feat(hub-common): add isHubHome prop (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannaeapicella authored May 16, 2024
1 parent e154720 commit f0bbf49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/common/src/core/types/IHubSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export interface IHubSite

/** Legacy teams - list of ids */
legacyTeams: string[];

/**
* True when the site is a "Hub Home" site
*/
isHubHome: boolean;
}

export type IHubSiteEditor = IHubItemEntityEditor<IHubSite> & {
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/sites/_internal/computeProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function computeProps(
site.updatedDate = new Date(model.item.modified);
site.updatedDateSource = "item.modified";
site.isDiscussable = isDiscussable(site);

/**
* Features that can be disabled by the entity owner
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/common/src/sites/_internal/getPropertyMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export function getPropertyMap(): IPropertyMap[] {
entityKey: "legacyTeams",
storeKey: "item.properties.teams",
});
map.push({
entityKey: "isHubHome",
storeKey: "item.properties.isHubHome",
});
map.push({ entityKey: "catalog", storeKey: "data.catalog" });

map.push({
Expand Down

0 comments on commit f0bbf49

Please sign in to comment.