Skip to content

Commit

Permalink
Add promise exercises links (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Lloyd authored and Purvi Kanal committed Apr 16, 2019
1 parent 3721693 commit 66ad98b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
7 changes: 7 additions & 0 deletions src/links/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ export const REDUCE = {
invite: 'https://repl.it/classroom/invite/8UoV4Jp',
exercise1: 'https://repl.it/student_embed/assignment/3006684/eafbd84d7fc2d91903fc2b221f707eae',
};

export const PROMISES = {
invite: 'https://repl.it/classroom/invite/8UoV4Jp',
resolveExercise: 'https://repl.it/student_embed/assignment/3006682/de2e0c6646be9ea7d83fb90933e2a1ac',
rejectExercise: 'https://repl.it/student_embed/assignment/3006686/0760b70e505cd68b70430d7333ed853d',
fetchExercise: 'https://repl.it/student_embed/assignment/3006685/ec4246de7d437c0be0511aefe4444655',
};
15 changes: 5 additions & 10 deletions src/slides/promises/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as usingPromiseCode from '!raw-loader!./using-a-promise.example';
import * as makingPromiseCode from '!raw-loader!./making-a-promise.example';
import promiseIllustration from './promises.png';
import { BasicCodeSlideMaker, ListSlideMaker, ReplClassSignup, ReplFrameSlide, IllustrationSlide } from '../../tools';
import { PROMISES } from '../../links';

const whatIsAPromiseGoodFor = ListSlideMaker(
'Promises: what are they good for?',
Expand Down Expand Up @@ -49,15 +50,11 @@ const writeAPromise = ListSlideMaker(
['Live code (Repl)'],
);

const replLink = ReplClassSignup('Promises', 'https://repl.it/classroom/invite/V7RIbIS');
const replLink = ReplClassSignup('Promises', PROMISES.invite);

const promiseResolveRepl = ReplFrameSlide(
'https://repl.it/student_embed/assignment/1129030/74479d935c296f8f9705a22acf29dd86',
);
const promiseResolveRepl = ReplFrameSlide(PROMISES.resolveExercise);

const promiseRejectRepl = ReplFrameSlide(
'https://repl.it/student_embed/assignment/1129032/5bf5309bdb323ced41ec1f28a148411f',
);
const promiseRejectRepl = ReplFrameSlide(PROMISES.rejectExercise);

const chainingPromises = ListSlideMaker(
'Promise chaining',
Expand All @@ -75,9 +72,7 @@ const chainingPromises = ListSlideMaker(
],
);

const chainingRepl = ReplFrameSlide(
'https://repl.it/student_embed/assignment/1129363/0cbafc25aa4f659c9385fe14d3525706',
);
const chainingRepl = ReplFrameSlide(PROMISES.fetchExercise);

export const PromisesSlideSet = [
whatIsAPromiseGoodFor,
Expand Down

0 comments on commit 66ad98b

Please sign in to comment.