Skip to content
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

fix: use hash links for new projects/groups #3457

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Changes from all commits
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
12 changes: 10 additions & 2 deletions client/src/features/dashboardV2/DashboardV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert";
import { Loader } from "../../components/Loader";
import { ABSOLUTE_ROUTES } from "../../routing/routes.constants";
import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook";
import { GROUP_CREATION_HASH } from "../groupsV2/new/createGroup.constants";
import CreateGroupButton from "../groupsV2/new/CreateGroupButton";
import {
GetGroupsApiResponse,
GetProjectsApiResponse,
useGetGroupsQuery,
useGetProjectsQuery,
} from "../projectsV2/api/projectV2.enhanced-api";
import { PROJECT_CREATION_HASH } from "../projectsV2/new/createProjectV2.constants";
import CreateProjectV2Button from "../projectsV2/new/CreateProjectV2Button";
import GroupShortHandDisplay from "../projectsV2/show/GroupShortHandDisplay";
import ProjectShortHandDisplay from "../projectsV2/show/ProjectShortHandDisplay";
Expand Down Expand Up @@ -519,7 +521,10 @@ function GroupsList({ data, error, isLoading }: GroupListProps) {
<ViewAllLink noItems={!hasGroups} type="group" total={data?.total ?? 0} />
) : (
<div className="d-flex">
<Link to={"/v2/groups/new"} className={cx("btn", "btn-outline-primary")}>
<Link
to={{ hash: GROUP_CREATION_HASH }}
className={cx("btn", "btn-outline-primary")}
>
<PlusSquare className={cx("bi", "me-1")} />
Create my first group
</Link>
Expand Down Expand Up @@ -606,7 +611,10 @@ function ViewAllLink({
function EmptyProjectsButtons() {
return (
<div className={cx("d-flex", "gap-3")}>
<Link to={"/v2/projects/new"} className={cx("btn", "btn-primary")}>
<Link
to={{ hash: PROJECT_CREATION_HASH }}
className={cx("btn", "btn-primary")}
>
<PlusSquare className={cx("bi", "me-1")} />
Create my first project
</Link>
Expand Down
Loading