Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat(#471): assign poll links on load
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Nov 20, 2019
1 parent ce9e2c0 commit 907805a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions studio/src/app/utils/editor/parse-slides.utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {QRCodeUtils} from './qrcode.utils';

import {Slide, SlideTemplate} from '../../models/data/slide';
import {Deck} from '../../models/data/deck';
import {EnvironmentDeckDeckGoConfig} from '../../services/core/environment/environment-config';
import {EnvironmentConfigService} from '../../services/core/environment/environment-config.service';

export class ParseSlidesUtils {

Expand Down Expand Up @@ -71,6 +73,12 @@ export class ParseSlidesUtils {
attributes['vertical'] = slide.data.attributes && slide.data.attributes.vertical ? 'true' : undefined;
}

if (slide.data.template === SlideTemplate.POLL) {
const deckDeckGoConfig: EnvironmentDeckDeckGoConfig = EnvironmentConfigService.getInstance().get('deckdeckgo');
attributes['pollLink'] = deckDeckGoConfig.pollUrl;
attributes['pollServerUrl'] = deckDeckGoConfig.pollServerUrl;
}

const SlideElement: string = slideTag;

const result: JSX.IntrinsicElements = <SlideElement key={uuid()} slide_id={ignoreSlideId ? undefined : slide.id} {...attributes}>
Expand Down

0 comments on commit 907805a

Please sign in to comment.