automatically set the base url

This commit is contained in:
Milo Schwartz
2024-10-06 14:09:26 -04:00
parent 29777da430
commit 0838679120
4 changed files with 40 additions and 38 deletions

View File

@@ -24,8 +24,8 @@ import {
} from "@/components/ui/card";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
import api from "@app/api";
import { LoginBody, LoginResponse } from "@server/routers/auth";
import { LoginResponse } from "@server/routers/auth";
import { api } from "@app/api";
const formSchema = z.object({
email: z.string().email({ message: "Invalid email address" }),
@@ -48,7 +48,7 @@ export default function LoginForm() {
async function onSubmit(values: z.infer<typeof formSchema>) {
const { email, password } = values;
const res = await api
.post<LoginBody, LoginResponse>("/auth/login", {
.post<LoginResponse>("/auth/login", {
email,
password,
})

View File

@@ -3,47 +3,47 @@
@tailwind utilities;
@layer base {
:root {
--background: 31 100% 100%;
--foreground: 31 5% 10%;
--card: 31 50% 100%;
--card-foreground: 31 5% 15%;
--popover: 31 100% 100%;
--popover-foreground: 31 100% 10%;
--primary: 31 11% 28%;
--background: 37 100% 100%;
--foreground: 37 5% 10%;
--card: 37 50% 100%;
--card-foreground: 37 5% 15%;
--popover: 37 100% 100%;
--popover-foreground: 37 100% 10%;
--primary: 37 8% 51%;
--primary-foreground: 0 0% 100%;
--secondary: 31 30% 90%;
--secondary: 37 30% 90%;
--secondary-foreground: 0 0% 0%;
--muted: -7 30% 95%;
--muted-foreground: 31 5% 40%;
--accent: -7 30% 90%;
--accent-foreground: 31 5% 15%;
--muted: -1 30% 95%;
--muted-foreground: 37 5% 40%;
--accent: -1 30% 90%;
--accent-foreground: 37 5% 15%;
--destructive: 0 100% 50%;
--destructive-foreground: 31 5% 100%;
--border: 31 30% 82%;
--input: 31 30% 50%;
--ring: 31 11% 28%;
--destructive-foreground: 37 5% 100%;
--border: 37 30% 82%;
--input: 37 30% 50%;
--ring: 37 8% 51%;
--radius: 0rem;
}
.dark {
--background: 31 50% 10%;
--foreground: 31 5% 100%;
--card: 31 50% 10%;
--card-foreground: 31 5% 100%;
--popover: 31 50% 5%;
--popover-foreground: 31 5% 100%;
--primary: 31 11% 28%;
--background: 37 50% 10%;
--foreground: 37 5% 100%;
--card: 37 50% 10%;
--card-foreground: 37 5% 100%;
--popover: 37 50% 5%;
--popover-foreground: 37 5% 100%;
--primary: 37 8% 51%;
--primary-foreground: 0 0% 100%;
--secondary: 31 30% 20%;
--secondary: 37 30% 20%;
--secondary-foreground: 0 0% 100%;
--muted: -7 30% 25%;
--muted-foreground: 31 5% 65%;
--accent: -7 30% 25%;
--accent-foreground: 31 5% 95%;
--muted: -1 30% 25%;
--muted-foreground: 37 5% 65%;
--accent: -1 30% 25%;
--accent-foreground: 37 5% 95%;
--destructive: 0 100% 50%;
--destructive-foreground: 31 5% 100%;
--border: 31 30% 50%;
--input: 31 30% 50%;
--ring: 31 11% 28%;
--destructive-foreground: 37 5% 100%;
--border: 37 30% 50%;
--input: 37 30% 50%;
--ring: 37 8% 51%;
--radius: 0rem;
}
}