env context and refactor api support different ports

This commit is contained in:
Milo Schwartz
2024-12-12 22:46:58 -05:00
parent d79760dad9
commit d3d2fe398b
35 changed files with 287 additions and 135 deletions

View File

@@ -14,12 +14,13 @@ import { useState } from "react";
import InviteUserForm from "./InviteUserForm";
import ConfirmDeleteDialog from "@app/components/ConfirmDeleteDialog";
import { useUserContext } from "@app/hooks/useUserContext";
import api from "@app/api";
import { useOrgContext } from "@app/hooks/useOrgContext";
import { useToast } from "@app/hooks/useToast";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { formatAxiosError } from "@app/lib/utils";
import { createApiClient } from "@app/api";
import { useEnvContext } from "@app/hooks/useEnvContext";
export type UserRow = {
id: string;
@@ -42,6 +43,8 @@ export default function UsersTable({ users: u }: UsersTableProps) {
const router = useRouter();
const api = createApiClient(useEnvContext());
const user = useUserContext();
const { org } = useOrgContext();
const { toast } = useToast();