Skip to content

Commit b088319

Browse files
committed
fix: set initial value of sidebar navigation to current year
1 parent 2e5fcfd commit b088319

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shared/containers/timeline-wall/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import './styles.scss';
2424
const FETCHING_PENDING_APPROVAL_EVENTS_INTERVAL = _.get(config, 'TIMELINE.FETCHING_PENDING_APPROVAL_EVENTS_INTERVAL', 0);
2525
const FORUM_LINK = _.get(config, 'TIMELINE.FORUM_LINK', '');
2626
function TimelineWallContainer(props) {
27+
const currentTime = new Date();
28+
const thisYear = currentTime.getFullYear();
2729
const [tab, setTab] = useState(0);
2830
const fetchingApprovalsInterval = useRef(null);
2931
const [showRightFilterMobile, setShowRightFilterMobile] = useState(false);
@@ -223,7 +225,7 @@ function TimelineWallContainer(props) {
223225
type="button"
224226
styleName="filter-dropdown hide-desktop show-mobile"
225227
>
226-
<span>{selectedFilterValue.year ? selectedFilterValue.year : ''}</span>
228+
<span>{selectedFilterValue.year ? selectedFilterValue.year : thisYear}</span>
227229
<IconCheveronDownBlue />
228230
</button>
229231
</div>

0 commit comments

Comments
 (0)