Skip to content

Commit

Permalink
chore: define all custom element names inline FUI-1198
Browse files Browse the repository at this point in the history
  • Loading branch information
matteematt committed Nov 30, 2023
1 parent 94dac23 commit 9f4d1c0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
6 changes: 2 additions & 4 deletions client/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import { HostENV, HostURL } from '../types';
import { Store, StoreEventDetailMap } from '../store';
import { logger } from '../utils';

const name = '{{rootElement}}';

export type EventMap = StoreEventDetailMap;

// eslint-disable-next-line
Expand All @@ -33,7 +31,7 @@ const hostEnv = location.host;
const hostUrl = API_HOST || `wss://${hostEnv}/gwf/`;

@customElement({
name,
name: '{{rootElement}}',
template,
styles,
})
Expand All @@ -51,7 +49,7 @@ export class MainApplication extends EventEmitter<EventMap>(FASTElement) {
public async connectedCallback() {
super.connectedCallback();

logger.debug(`${name} is now connected to the DOM`);
logger.debug(`'{{rootElement}}' is now connected to the DOM`);

this.registerDIDependencies();
await this.loadRemotes();
Expand Down
4 changes: 1 addition & 3 deletions client/src/routes/analytics/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import { customElement, FASTElement, observable } from '@microsoft/fast-element'
import { AnalyticsTemplate as template } from './analytics.template';
import { AnalyticsStyles as styles } from './analytics.styles';

const name = 'reports-route';

@customElement({
name,
name: 'reports-route',
template,
styles,
})
Expand Down
6 changes: 2 additions & 4 deletions client/src/routes/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { HomeTemplate as template } from './home.template';
import { FoundationLayout } from '@genesislcap/foundation-layout';
import { HOME_PREDEFINED_LAYOUT } from './predefined-layouts';

const name = 'home-route';

export type EventMap = StoreEventDetailMap;
@customElement({
name,
name: 'home-route',
template,
styles,
})
Expand All @@ -38,7 +36,7 @@ export class Home extends EventEmitter<EventMap>(FASTElement) {
public connectedCallback() {
super.connectedCallback();

logger.debug(`${name} is now connected to the DOM`);
logger.debug(`home-route is now connected to the DOM`);

this.store.binding('sideNavClosed', (closed) => {
this.editModalVisibleChanged(closed);
Expand Down
4 changes: 1 addition & 3 deletions client/src/routes/not-found/not-found.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { NotFoundTemplate as template } from './not-found.template';
import { NotFoundStyles as styles } from './not-found.styles';
import { logger } from '../../utils';

const name = 'not-found-route';

@customElement({
name,
name: 'not-found-route',
template,
styles,
})
Expand Down

0 comments on commit 9f4d1c0

Please sign in to comment.