Skip to content

feat(site): embed users page in management settings #14006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix navigation
  • Loading branch information
aslilac committed Jul 24, 2024
commit 1179e5102dd83dc039e4d35c77adbafabd73eb94
4 changes: 2 additions & 2 deletions site/src/pages/CreateUserPage/CreateUserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export const CreateUserPage: FC = () => {
onSubmit={async (user) => {
await createUserMutation.mutateAsync(user);
displaySuccess("Successfully created user.");
navigate("/users");
navigate("..", { relative: "path" });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo such a good idea, relative is smart

}}
onCancel={() => {
navigate("/users");
navigate("..", { relative: "path" });
}}
isLoading={createUserMutation.isLoading}
organizationId={organizationId}
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/UsersPage/UsersPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const UsersPageView: FC<UsersPageViewProps> = ({
<>
{canCreateUser && (
<Button
onClick={() => navigate("/users/create")}
onClick={() => navigate("create")}
startIcon={<PersonAdd />}
>
Create user
Expand Down
1 change: 1 addition & 0 deletions site/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ export const router = createBrowserRouter(

<Route path="workspace-proxies" element={<WorkspaceProxyPage />} />
<Route path="users" element={<UsersPage />} />
<Route path="users/create" element={<CreateUserPage />} />
</Route>

<Route path="/settings" element={<UserSettingsLayout />}>
Expand Down
Loading