Skip to content

Commit

Permalink
Remove leftover page layout components (#7012)
Browse files Browse the repository at this point in the history
  • Loading branch information
eladlachmi authored Nov 16, 2023
1 parent 49e5585 commit 9bbd860
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
12 changes: 5 additions & 7 deletions webui/src/pages/auth/users/user/effectivePolicies.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from "react";
import React, {useEffect, useState} from "react";
import {useOutletContext} from "react-router-dom";

import {AuthLayout} from "../../../../lib/components/auth/layout";
import {UserHeaderWithContext} from "./userHeaderWithContext";
import {useAPIWithPagination} from "../../../../lib/hooks/api";
import {auth} from "../../../../lib/api";
Expand Down Expand Up @@ -85,11 +85,9 @@ const UserEffectivePoliciesContainer = () => {
};

const UserEffectivePoliciesPage = () => {
return (
<AuthLayout activeTab="users">
<UserEffectivePoliciesContainer/>
</AuthLayout>
);
const {setActiveTab} = useOutletContext();
useEffect(() => setActiveTab("users"), [setActiveTab]);
return <UserEffectivePoliciesContainer/>;
};

export default UserEffectivePoliciesPage;
13 changes: 5 additions & 8 deletions webui/src/pages/auth/users/user/policies.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";

import {AuthLayout} from "../../../../lib/components/auth/layout";
import React, {useEffect} from "react";
import {useOutletContext} from "react-router-dom";
import {UserHeaderWithContext} from "./userHeaderWithContext";
import {
ActionGroup,
Expand Down Expand Up @@ -117,11 +116,9 @@ const UserPoliciesContainer = () => {
};

const UserPoliciesPage = () => {
return (
<AuthLayout activeTab="users">
<UserPoliciesContainer />
</AuthLayout>
);
const {setActiveTab} = useOutletContext();
useEffect(() => setActiveTab("users"), [setActiveTab]);
return <UserPoliciesContainer/>;
};

export default UserPoliciesPage;
12 changes: 5 additions & 7 deletions webui/src/pages/repositories/repository/actions/run/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from "react";
import React, {useEffect, useState} from "react";
import {useOutletContext} from "react-router-dom";

import {RepositoryPageLayout} from "../../../../../lib/components/repository/layout";
import {AlertError, FormattedDate, Loading, Na} from "../../../../../lib/components/controls";
import {useRefs} from "../../../../../lib/hooks/repo";
import {useAPI} from "../../../../../lib/hooks/api";
Expand Down Expand Up @@ -245,11 +245,9 @@ const ActionContainer = () => {
}

const RepositoryActionPage = () => {
return (
<RepositoryPageLayout activePage={'actions'} fluid>
<ActionContainer/>
</RepositoryPageLayout>
);
const [setActivePage] = useOutletContext();
useEffect(() => setActivePage('actions'), [setActivePage]);
return <ActionContainer/>;
};

export default RepositoryActionPage;

0 comments on commit 9bbd860

Please sign in to comment.