mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-14 14:48:44 +02:00
env context and refactor api support different ports
This commit is contained in:
parent
d79760dad9
commit
d3d2fe398b
35 changed files with 287 additions and 135 deletions
|
@ -27,7 +27,6 @@ import {
|
|||
InputOTPGroup,
|
||||
InputOTPSlot,
|
||||
} from "@/components/ui/input-otp";
|
||||
import api from "@app/api";
|
||||
import { AxiosResponse } from "axios";
|
||||
import { VerifyEmailResponse } from "@server/routers/auth";
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
@ -35,6 +34,8 @@ import { Alert, AlertDescription } from "../../../components/ui/alert";
|
|||
import { useToast } from "@app/hooks/useToast";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { formatAxiosError } from "@app/lib/utils";
|
||||
import { createApiClient } from "@app/api";
|
||||
import { useEnvContext } from "@app/hooks/useEnvContext";
|
||||
|
||||
const FormSchema = z.object({
|
||||
email: z.string().email({ message: "Invalid email address" }),
|
||||
|
@ -61,6 +62,8 @@ export default function VerifyEmailForm({
|
|||
|
||||
const { toast } = useToast();
|
||||
|
||||
const api = createApiClient(useEnvContext());
|
||||
|
||||
const form = useForm<z.infer<typeof FormSchema>>({
|
||||
resolver: zodResolver(FormSchema),
|
||||
defaultValues: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue