Skip to content

Commit

Permalink
fix: implement review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Jun 7, 2024
1 parent 2eb0ca8 commit ad48b7d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/experiment/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def serialize_experiment(experiment_object: Experiment, participant: Participant
'started_session_count': get_started_session_count(experiment_object, participant),
'finished_session_count': get_finished_session_count(experiment_object, participant),
'description': experiment_object.description,
'image': serialize_image(experiment_object.image) if experiment_object.image else '',
'image': serialize_image(experiment_object.image) if experiment_object.image else None,
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const ExperimentCollectionDashboard: React.FC<ExperimentCollectionDashboa
{dashboard.map((exp: IExperiment) => (
<li key={exp.slug}>
<Link to={getExperimentHref(exp.slug)} role="menuitem">
<ImageOrPlaceholder imagePath={exp.image.file} alt={exp.description} />
<ImageOrPlaceholder imagePath={exp.image?.file} alt={exp.image?.alt ?? exp.description} />
<h3>{exp.name}</h3>
<p>{exp.description}</p>
</Link>
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/scss/color-schemes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
@include btn-style($blue);
}
}

.player {

}
}

.neutral-inverted {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/Experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default interface Experiment {
name: string;
slug: string;
description: string;
image: IImage;
image?: IImage;
started_session_count: number;
finished_session_count: number;
}

0 comments on commit ad48b7d

Please sign in to comment.