Skip to content

Commit

Permalink
Revert "chore(custom-views): Switch to useLayoutEffect (#76695)"
Browse files Browse the repository at this point in the history
This reverts commit 461f6c4.

Co-authored-by: MichaelSun48 <55160142+MichaelSun48@users.noreply.github.com>
  • Loading branch information
2 people authored and ArthurKnaus committed Aug 29, 2024
1 parent 5a58837 commit 83f422f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/app/views/issueList/customViewsHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useContext, useEffect, useLayoutEffect, useMemo, useState} from 'react';
import {useContext, useEffect, useMemo, useState} from 'react';
import type {InjectedRouter} from 'react-router';
import styled from '@emotion/styled';
import debounce from 'lodash/debounce';
Expand Down Expand Up @@ -164,7 +164,7 @@ function CustomViewsIssueListHeaderTabsContent({
);

// This insane useEffect ensures that the correct tab is selected when the url updates
useLayoutEffect(() => {
useEffect(() => {
// If no query, sort, or viewId is present, set the first tab as the selected tab, update query accordingly
if (!query && !sort && !viewId) {
navigate({
Expand Down

0 comments on commit 83f422f

Please sign in to comment.