import React from 'react';
import PropTypes from 'prop-types';

// Components
import ModuleRow from '@components/timeline/TrainingModules/ModuleRow/ModuleRow.jsx';

export const UpcomingExercise = ({ exercise, trainingLibrarySlug }) => (
  <table className="table">
    <tbody>
      <ModuleRow
        key={exercise.id}
        module={exercise}
        trainingLibrarySlug={trainingLibrarySlug}
      />
    </tbody>
  </table>
);

UpcomingExercise.propTypes = {
  exercise: PropTypes.object.isRequired
};

export default UpcomingExercise;

import React from 'react';
import PropTypes from 'prop-types';

// Components
import ModuleRow from '@components/timeline/TrainingModules/ModuleRow/ModuleRow.jsx';

export const UpcomingExercise = ({ exercise, trainingLibrarySlug }) => (
  <table className="table">
    <tbody>
      <ModuleRow
        key={exercise.id}
        isStudent
        module={exercise}
        trainingLibrarySlug={trainingLibrarySlug}
      />
    </tbody>
  </table>
);

UpcomingExercise.propTypes = {
  exercise: PropTypes.object.isRequired
};

export default UpcomingExercise;

Use isStudent flag for MyExercises
Use isStudent flag for MyExercises
