Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Sep 24, 2023
1 parent 228df75 commit eb3cc80
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions apps/picsa-apps/extension-app/src/app/pages/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ const PAGE_LINKS: IPageLink[] = [
url: '/option',
tourId: 'option',
},
{
name: translateMarker('Seasonal Calendar'),
icon: 'picsa_seasonal_calendar_tool',
url: '/seasonal-calendar',
tourId: 'seasonal-calendar',
devOnly: true,
},

// {
// name: translateMarker('Discussions'),
Expand All @@ -84,14 +77,30 @@ const PAGE_LINKS: IPageLink[] = [
// }
];

/** Additional links only available when running in non-production */
const DEV_PAGE_LINKS: IPageLink[] = [
{
name: translateMarker('Seasonal Calendar'),
icon: 'picsa_seasonal_calendar_tool',
url: '/seasonal-calendar',
tourId: 'seasonal-calendar',
devOnly: true,
},
];
if (!ENVIRONMENT.production) {
for (const link of DEV_PAGE_LINKS) {
PAGE_LINKS.push(link);
}
}

@Component({
selector: 'app-home',
templateUrl: './home.page.html',
styleUrls: ['./home.page.scss'],
})
export class HomePage implements OnDestroy, AfterViewInit {
/** List of home page display links, filtered when running in production */
public links = PAGE_LINKS.filter((link) => (ENVIRONMENT.production ? !link.devOnly : link));
public links = PAGE_LINKS;
public version = APP_VERSION;

private userEventSubscription: Subscription;
Expand Down

0 comments on commit eb3cc80

Please sign in to comment.