Skip to content

Commit be946b1

Browse files
committed
rename for clarity
1 parent 5e6fa13 commit be946b1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

components/dashboard/src/data/projects/list-projects-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type ListProjectsQueryResults = {
1414
projects: Project[];
1515
};
1616

17-
export const useListProjectsQuery = () => {
17+
export const useListAllProjectsQuery = () => {
1818
const org = useCurrentOrg().data;
1919
const orgId = org?.id;
2020
return useQuery<ListProjectsQueryResults>({

components/dashboard/src/projects/Projects.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Alert from "../components/Alert";
1212
import Header from "../components/Header";
1313
import { SpinnerLoader } from "../components/Loader";
1414
import { useCurrentOrg } from "../data/organizations/orgs-query";
15-
import { useListProjectsQuery } from "../data/projects/list-projects-query";
15+
import { useListAllProjectsQuery } from "../data/projects/list-projects-query";
1616
import search from "../icons/search.svg";
1717
import { Heading2 } from "../components/typography/headings";
1818
import projectsEmptyDark from "../images/projects-empty-dark.svg";
@@ -27,7 +27,7 @@ export default function ProjectsPage() {
2727
const createProjectModal = useFeatureFlag("createProjectModal");
2828
const history = useHistory();
2929
const team = useCurrentOrg().data;
30-
const { data, isLoading, isError, refetch } = useListProjectsQuery();
30+
const { data, isLoading, isError, refetch } = useListAllProjectsQuery();
3131
const { isDark } = useContext(ThemeContext);
3232
const [searchFilter, setSearchFilter] = useState<string | undefined>();
3333
const [showCreateProjectModal, setShowCreateProjectModal] = useState(false);

components/dashboard/src/projects/project-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useHistory, useLocation, useRouteMatch } from "react-router";
1010
import { useCurrentOrg, useOrganizations } from "../data/organizations/orgs-query";
1111
import { listAllProjects } from "../service/public-api";
1212
import { useCurrentUser } from "../user-context";
13-
import { useListProjectsQuery } from "../data/projects/list-projects-query";
13+
import { useListAllProjectsQuery } from "../data/projects/list-projects-query";
1414

1515
export const ProjectContext = createContext<{
1616
project?: Project;
@@ -36,7 +36,7 @@ export function useCurrentProject(): { project: Project | undefined; loading: bo
3636
const projectIdFromRoute = useRouteMatch<{ projectId?: string }>("/projects/:projectId")?.params?.projectId;
3737
const location = useLocation();
3838
const history = useHistory();
39-
const listProjects = useListProjectsQuery();
39+
const listProjects = useListAllProjectsQuery();
4040

4141
useEffect(() => {
4242
setLoading(true);

components/dashboard/src/workspaces/CreateWorkspacePage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { InputField } from "../components/forms/InputField";
2929
import { Heading1 } from "../components/typography/headings";
3030
import { useAuthProviders } from "../data/auth-providers/auth-provider-query";
3131
import { useCurrentOrg } from "../data/organizations/orgs-query";
32-
import { useListProjectsQuery } from "../data/projects/list-projects-query";
32+
import { useListAllProjectsQuery } from "../data/projects/list-projects-query";
3333
import { useCreateWorkspaceMutation } from "../data/workspaces/create-workspace-mutation";
3434
import { useListWorkspacesQuery } from "../data/workspaces/list-workspaces-query";
3535
import { useWorkspaceContext } from "../data/workspaces/resolve-context-query";
@@ -47,7 +47,7 @@ import { WorkspaceEntry } from "./WorkspaceEntry";
4747
export function CreateWorkspacePage() {
4848
const { user, setUser } = useContext(UserContext);
4949
const currentOrg = useCurrentOrg().data;
50-
const projects = useListProjectsQuery();
50+
const projects = useListAllProjectsQuery();
5151
const workspaces = useListWorkspacesQuery({ limit: 50 });
5252
const location = useLocation();
5353
const history = useHistory();

0 commit comments

Comments
 (0)