Skip to content

Commit

Permalink
fix: last build default collapse as true
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <[email protected]>
  • Loading branch information
clegirar committed Oct 29, 2020
1 parent 96b055d commit 6b2a8f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/src/ui/components/Build/BuildContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ const LatestBuildStateTags = ({
};

const BuildContainer = React.memo(
({ build, toCollapse, hasRunningBuilds, isLatestMaster = false }) => {
({ build, hasRunningBuilds, isLatestMaster = false }) => {
const { state } = useContext(GlobalContext);
const [collapsed, setCollapsed] = useState(toCollapse);
const [collapsed, setCollapsed] = useState(true);
const [showingAllBuilds, toggleShowingAllBuilds] = useState(false);

const { theme } = useContext(ThemeContext);
Expand Down
2 changes: 0 additions & 2 deletions web/src/ui/components/BuildList.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const Feed = ({
{!indexOfLatestMasterBuildsForProjects.includes(i) && (
<BuildContainer
build={build}
toCollapse={indexOfLatestMasterBuildsForProjects.length > 0}
hasRunningBuilds={buildsStateIsRunning(
build.allBuildsForMr,
builds,
Expand Down Expand Up @@ -194,7 +193,6 @@ const BuildList = ({ builds = [], loaded }) => {
<BuildContainer
key={`${build.id}-${i}`}
build={build}
toCollapse={false}
isLatestMaster
hasRunningBuilds={buildsStateIsRunning(
build.allBuildsForMr,
Expand Down

0 comments on commit 6b2a8f4

Please sign in to comment.