Skip to content

Commit

Permalink
front: use a smaller placeholder rolling stock image
Browse files Browse the repository at this point in the history
  • Loading branch information
multun committed Jul 17, 2023
1 parent 532f46a commit 888a5ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion front/src/assets/pictures/blue_train.svg.REMOVED.git-id

This file was deleted.

1 change: 1 addition & 0 deletions front/src/assets/pictures/placeholder_rolling_stock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions front/src/common/RollingStockSelector/RollingStock2Img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { LazyLoadImage } from 'react-lazy-load-image-component';
import { LightRollingStock, RollingStock } from 'common/api/osrdEditoastApi';
import { getDocument } from 'common/api/documentApi';
import blueTrain from 'assets/pictures/blue_train.svg';
import placeholderRollingStock from 'assets/pictures/placeholder_rolling_stock.svg';

const RollingStock2Img: React.FC<{ rollingStock: RollingStock | LightRollingStock }> = ({
rollingStock,
Expand All @@ -18,7 +18,7 @@ const RollingStock2Img: React.FC<{ rollingStock: RollingStock | LightRollingStoc

const defaultLivery = liveries.find((livery) => livery.name === 'default');
if (!defaultLivery?.compound_image_id) {
setImageUrl(blueTrain);
setImageUrl(placeholderRollingStock);
return;
}

Expand Down

0 comments on commit 888a5ca

Please sign in to comment.