Skip to content

Commit

Permalink
move template
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh committed Aug 9, 2022
1 parent 5fe5bdf commit 41de667
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 2 additions & 7 deletions apps/meteor/client/startup/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import React, { lazy } from 'react';
import { KonchatNotification } from '../../app/ui/client';
import { APIClient } from '../../app/utils/client';
import { appLayout } from '../lib/appLayout';
import { createTemplateForComponent } from '../lib/portals/createTemplateForComponent';
import { dispatchToastMessage } from '../lib/toast';
import { handleError } from '../lib/utils/handleError';
import BlazeTemplate from '../views/root/BlazeTemplate';
Expand Down Expand Up @@ -97,10 +96,6 @@ FlowRouter.route('/home', {
name: 'home',

action(_params, queryParams) {
const HomePage = createTemplateForComponent('HomePage', () => import('../views/home/HomePage'), {
attachment: 'at-parent',
});

KonchatNotification.getDesktopPermission();
if (queryParams?.saml_idp_credentialToken !== undefined) {
const token = queryParams.saml_idp_credentialToken;
Expand All @@ -118,7 +113,7 @@ FlowRouter.route('/home', {

appLayout.render(
<MainLayout>
<BlazeTemplate template={HomePage} />
<BlazeTemplate template={'HomePage'} />
</MainLayout>,
);
});
Expand All @@ -128,7 +123,7 @@ FlowRouter.route('/home', {

appLayout.render(
<MainLayout>
<BlazeTemplate template={HomePage} />
<BlazeTemplate template={'HomePage'} />
</MainLayout>,
);
},
Expand Down
4 changes: 4 additions & 0 deletions apps/meteor/client/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { HTML } from 'meteor/htmljs';

import { createTemplateForComponent } from './lib/portals/createTemplateForComponent';

createTemplateForComponent('HomePage', () => import('./views/home/HomePage'), {
attachment: 'at-parent',
});

createTemplateForComponent('MessageActions', () => import('./components/message/MessageActions'));

createTemplateForComponent('reactAttachments', () => import('./components/message/Attachments'));
Expand Down

0 comments on commit 41de667

Please sign in to comment.