Skip to content

Commit

Permalink
StatsHouse UI: update style icon 403
Browse files Browse the repository at this point in the history
  • Loading branch information
vauweb committed Mar 25, 2024
1 parent 7a7e6f7 commit eddb229
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const HeaderMenuItemPlot: React.FC<HeaderMenuItemPlotProps> = ({ indexPlo
<PlotLink
className={cn(
'nav-link',
!plotData.error403 && ['p-0', css.preview],
!plotData.error403 ? css.preview : css.preview403,
plot.type === PLOT_TYPE.Event && css.previewEvent
)}
indexPlot={indexPlot}
Expand Down
5 changes: 4 additions & 1 deletion statshouse-ui/src/components/HeaderMenu/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@
height: 37px;
width: 100%;
max-width: 100%;
padding: 0;
}

.preview {
.preview403 {
padding: 7px var(--bs-nav-link-padding-x) 6px;
}

.previewEvent {
Expand All @@ -101,6 +103,7 @@
}

.icon {
display: block;
width: 24px;
height: 24px;
}
Expand Down
4 changes: 4 additions & 0 deletions statshouse-ui/src/store/statshouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,10 @@ export const useStore = createStoreWithEqualityFn<Store>((setState, getState, st
);
const prev: PlotStore = getState().plotsData[index];

if (prev.error403) {
return;
}

const deltaTime = Math.floor((prevStateTo - prevStateFrom) / 5);
if (
!usePlotVisibilityStore.getState().visibilityList[index] &&
Expand Down

0 comments on commit eddb229

Please sign in to comment.