File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,9 +21,7 @@ const formatPercent = (percent) => {
2121const AssetSize = ( ) => {
2222 const { t } = useTranslation ( ) ;
2323
24- const totalSize = useSelector (
25- ( state ) => state . user . totalSize || state . assets . totalSize
26- ) ;
24+ const totalSize = useSelector ( ( state ) => state . assets . totalSize ) ;
2725
2826 if ( totalSize === undefined ) {
2927 return null ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
22
33const initialState = {
44 list : [ ] ,
5- totalSize : 0
5+ totalSize : undefined
66} ;
77
88const assetsSlice = createSlice ( {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const getreachedTotalSizeLimit = createSelector(
2626 getTotalSize ,
2727 getAssetsTotalSize ,
2828 ( totalSize , assetsTotalSize ) => {
29- const currentSize = totalSize || assetsTotalSize || 0 ;
29+ const currentSize = assetsTotalSize ?? totalSize ?? 0 ;
3030 if ( currentSize >= limit ) return true ;
3131 // if (totalSize > 1000) return true;
3232 return false ;
You can’t perform that action at this time.
0 commit comments