Minor tweaks to routes and frontend. Added generated routes from openapi.json

This commit is contained in:
Thastertyn 2025-03-12 20:43:17 +01:00
parent 75b2b1e142
commit 39b99d5509
9 changed files with 8717 additions and 8084 deletions

View File

@ -4,6 +4,7 @@ from sqlmodel import select
from fastapi import APIRouter
from app.api.dependencies import SessionDep
from app.core.config import settings
logger = logging.getLogger(__name__)
@ -15,7 +16,7 @@ async def health_check() -> bool:
return True
@router.get("/test-db/")
@router.get("/test-db/", include_in_schema=settings.is_local_environment)
async def test_db(session: SessionDep) -> bool:
try:
session.exec(select(1))

View File

@ -83,6 +83,11 @@ class Settings(BaseSettings):
def emails_enabled(self) -> bool:
return bool(self.SMTP_HOST and self.EMAILS_FROM_EMAIL)
@computed_field
@property
def is_local_environment(self) -> bool:
return self.ENVIRONMENT == "local"
EMAIL_TEST_USER: EmailStr = "test@example.com"
FIRST_SUPERUSER: EmailStr
FIRST_SUPERUSER_PASSWORD: str

15950
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,88 +1,89 @@
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
"format:check": "prettier --check .",
"format": "prettier --write .",
"knip": "knip"
},
"dependencies": {
"@hey-api/client-fetch": "^0.8.3",
"@hookform/resolvers": "^3.9.1",
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-scroll-area": "^1.2.1",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.4",
"@radix-ui/react-visually-hidden": "^1.1.0",
"@tabler/icons-react": "^3.24.0",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-router": "^1.86.1",
"@tanstack/react-table": "^8.20.5",
"@vitejs/plugin-react": "^4.3.4",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"date-fns": "^4.1.0",
"js-cookie": "^3.0.5",
"lucide-react": "^0.475.0",
"react": "^19.0.0",
"react-day-picker": "^8.10.1",
"react-dom": "^19.0.0",
"react-hook-form": "^7.54.0",
"recharts": "^2.14.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.24.2",
"zustand": "^5.0.3"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@faker-js/faker": "^9.3.0",
"@hey-api/openapi-ts": "^0.64.11",
"@tanstack/eslint-plugin-query": "^5.62.1",
"@tanstack/react-query-devtools": "^5.62.3",
"@tanstack/router-devtools": "^1.86.1",
"@tanstack/router-plugin": "^1.86.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.1",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"knip": "^5.41.1",
"postcss": "^8.5.3",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwindcss": "^3.4.17",
"typescript": "~5.7.2",
"typescript-eslint": "^8.22.0",
"vite": "^6.1.0"
}
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
"format:check": "prettier --check .",
"format": "prettier --write .",
"knip": "knip",
"generate-client": "openapi-ts --input http://localhost:8000/openapi.json --output ./src/client --client @hey-api/client-axios"
},
"dependencies": {
"@hookform/resolvers": "^3.9.1",
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-scroll-area": "^1.2.1",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.4",
"@radix-ui/react-visually-hidden": "^1.1.0",
"@tabler/icons-react": "^3.24.0",
"@tanstack/react-query": "^5.62.3",
"@tanstack/react-router": "^1.86.1",
"@tanstack/react-table": "^8.20.5",
"@vitejs/plugin-react": "^4.3.4",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
"date-fns": "^4.1.0",
"js-cookie": "^3.0.5",
"lucide-react": "^0.475.0",
"react": "^19.0.0",
"react-day-picker": "^8.10.1",
"react-dom": "^19.0.0",
"react-hook-form": "^7.54.0",
"recharts": "^2.14.1",
"tailwind-merge": "^3.0.1",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.24.2",
"zustand": "^5.0.3"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@faker-js/faker": "^9.3.0",
"@hey-api/client-axios": "^0.6.2",
"@hey-api/openapi-ts": "^0.64.11",
"@tanstack/eslint-plugin-query": "^5.62.1",
"@tanstack/react-query-devtools": "^5.62.3",
"@tanstack/router-devtools": "^1.86.1",
"@tanstack/router-plugin": "^1.86.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.10.1",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"knip": "^5.41.1",
"postcss": "^8.5.3",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"tailwindcss": "^3.4.17",
"typescript": "~5.7.2",
"typescript-eslint": "^8.22.0",
"vite": "^6.1.0"
}
}

View File

@ -0,0 +1,18 @@
// This file is auto-generated by @hey-api/openapi-ts
import type { ClientOptions } from './types.gen';
import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-axios';
/**
* The `createClientConfig()` function will be called on client initialization
* and the returned object will become the client's initial configuration.
*
* You may want to initialize your client this way instead of calling
* `setConfig()`. This is useful for example if you're using Next.js
* to ensure your client always has the correct values.
*/
export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (override?: Config<DefaultClientOptions & T>) => Config<Required<DefaultClientOptions> & T>;
export const client = createClient(createConfig<ClientOptions>({
baseURL: 'http://localhost:8000'
}));

View File

@ -0,0 +1,3 @@
// This file is auto-generated by @hey-api/openapi-ts
export * from './types.gen';
export * from './sdk.gen';

View File

@ -0,0 +1,217 @@
// This file is auto-generated by @hey-api/openapi-ts
import { type Options as ClientOptions, type TDataShape, type Client, urlSearchParamsBodySerializer } from '@hey-api/client-axios';
import type { CartShowCartData, CartAddToCartData, CartAddToCartError, CartRemoveFromCartData, CartRemoveFromCartError, CartUpdateCountInCartData, CartUpdateCountInCartError, CartPurchaseData, UserDeleteUserData, UserLogoutData, UserRegisterData, UserRegisterError, UserUpdateUserData, UserUpdateUserError, UtilsHealthCheckData, UtilsHealthCheckResponse, UtilsTestDbData, UtilsTestDbResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginLoginAccessTokenError, ShopLoginAccessTokenData, ShopLoginAccessTokenResponse, ShopLoginAccessTokenError, ShopDeleteUserData, ShopDeleteUserError, ShopLogoutData, ShopRegisterData, ShopRegisterError, ShopUpdateUserData, ShopUpdateUserError } from './types.gen';
import { client as _heyApiClient } from './client.gen';
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
/**
* You can provide a client instance returned by `createClient()` instead of
* individual options. This might be also useful if you want to implement a
* custom client.
*/
client?: Client;
/**
* You can pass arbitrary values through the `meta` object. This can be
* used to access values that aren't defined as part of the SDK function.
*/
meta?: Record<string, unknown>;
};
/**
* Show Cart
*/
export const cartShowCart = <ThrowOnError extends boolean = false>(options?: Options<CartShowCartData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<unknown, unknown, ThrowOnError>({
url: '/cart/',
...options
});
};
/**
* Add To Cart
*/
export const cartAddToCart = <ThrowOnError extends boolean = false>(options: Options<CartAddToCartData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).put<unknown, CartAddToCartError, ThrowOnError>({
url: '/cart/add/{product_id}',
...options
});
};
/**
* Remove From Cart
*/
export const cartRemoveFromCart = <ThrowOnError extends boolean = false>(options: Options<CartRemoveFromCartData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).delete<unknown, CartRemoveFromCartError, ThrowOnError>({
url: '/cart/remove/{product_id}',
...options
});
};
/**
* Update Count In Cart
*/
export const cartUpdateCountInCart = <ThrowOnError extends boolean = false>(options: Options<CartUpdateCountInCartData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).put<unknown, CartUpdateCountInCartError, ThrowOnError>({
url: '/cart/update/{product_id}',
...options
});
};
/**
* Purchase
*/
export const cartPurchase = <ThrowOnError extends boolean = false>(options?: Options<CartPurchaseData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<unknown, unknown, ThrowOnError>({
url: '/cart/purchase',
...options
});
};
/**
* Delete user
*/
export const userDeleteUser = <ThrowOnError extends boolean = false>(options?: Options<UserDeleteUserData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).delete<unknown, unknown, ThrowOnError>({
url: '/user/delete',
...options
});
};
/**
* User logout
*/
export const userLogout = <ThrowOnError extends boolean = false>(options?: Options<UserLogoutData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).delete<unknown, unknown, ThrowOnError>({
url: '/user/logout',
...options
});
};
/**
* Register new user
*/
export const userRegister = <ThrowOnError extends boolean = false>(options: Options<UserRegisterData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<unknown, UserRegisterError, ThrowOnError>({
url: '/user/register',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* Update user details
*/
export const userUpdateUser = <ThrowOnError extends boolean = false>(options: Options<UserUpdateUserData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).put<unknown, UserUpdateUserError, ThrowOnError>({
url: '/user/update',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* Health Check
*/
export const utilsHealthCheck = <ThrowOnError extends boolean = false>(options?: Options<UtilsHealthCheckData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<UtilsHealthCheckResponse, unknown, ThrowOnError>({
url: '/utils/health-check/',
...options
});
};
/**
* Test Db
*/
export const utilsTestDb = <ThrowOnError extends boolean = false>(options?: Options<UtilsTestDbData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).get<UtilsTestDbResponse, unknown, ThrowOnError>({
url: '/utils/test-db/',
...options
});
};
/**
* Login Access Token
* OAuth2 compatible token login, get an access token for future requests
*/
export const loginLoginAccessToken = <ThrowOnError extends boolean = false>(options: Options<LoginLoginAccessTokenData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<LoginLoginAccessTokenResponse, LoginLoginAccessTokenError, ThrowOnError>({
...urlSearchParamsBodySerializer,
url: '/login/access-token',
...options,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
...options?.headers
}
});
};
/**
* Login Access Token
* OAuth2 compatible token login, get an access token for future requests
*/
export const shopLoginAccessToken = <ThrowOnError extends boolean = false>(options: Options<ShopLoginAccessTokenData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<ShopLoginAccessTokenResponse, ShopLoginAccessTokenError, ThrowOnError>({
...urlSearchParamsBodySerializer,
url: '/shop/{shop_uuid}/login/access-token',
...options,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
...options?.headers
}
});
};
/**
* Delete user
*/
export const shopDeleteUser = <ThrowOnError extends boolean = false>(options: Options<ShopDeleteUserData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).delete<unknown, ShopDeleteUserError, ThrowOnError>({
url: '/shop/{shop_uuid}/user/delete',
...options
});
};
/**
* User logout
*/
export const shopLogout = <ThrowOnError extends boolean = false>(options?: Options<ShopLogoutData, ThrowOnError>) => {
return (options?.client ?? _heyApiClient).delete<unknown, unknown, ThrowOnError>({
url: '/shop/{shop_uuid}/user/logout',
...options
});
};
/**
* Register new user
*/
export const shopRegister = <ThrowOnError extends boolean = false>(options: Options<ShopRegisterData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<unknown, ShopRegisterError, ThrowOnError>({
url: '/shop/{shop_uuid}/user/register',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};
/**
* Update user details
*/
export const shopUpdateUser = <ThrowOnError extends boolean = false>(options: Options<ShopUpdateUserData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).put<unknown, ShopUpdateUserError, ThrowOnError>({
url: '/shop/{shop_uuid}/user/update',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};

View File

@ -0,0 +1,408 @@
// This file is auto-generated by @hey-api/openapi-ts
export type BodyLoginLoginAccessToken = {
grant_type?: string | null;
username: string;
password: string;
scope?: string;
client_id?: string | null;
client_secret?: string | null;
};
export type BodyShopLoginAccessToken = {
grant_type?: string | null;
username: string;
password: string;
scope?: string;
client_id?: string | null;
client_secret?: string | null;
};
export type HttpValidationError = {
detail?: Array<ValidationError>;
};
export type Token = {
access_token: string;
token_type?: string;
};
export type UserRegister = {
username: string;
email: string;
phone_number: string;
/**
* Password must be at least 8 and at most 128 characters long, contain a lower case, upper case letter, a number and a special character (#?!@$ %^&*-)
*/
password: string;
};
export type ValidationError = {
loc: Array<string | number>;
msg: string;
type: string;
};
export type CartShowCartData = {
body?: never;
path?: never;
query?: never;
url: '/cart/';
};
export type CartShowCartResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type CartAddToCartData = {
body?: never;
path: {
product_id: number;
};
query?: {
/**
* Count must be greater than or equal to 1
*/
count?: number;
};
url: '/cart/add/{product_id}';
};
export type CartAddToCartErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type CartAddToCartError = CartAddToCartErrors[keyof CartAddToCartErrors];
export type CartAddToCartResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type CartRemoveFromCartData = {
body?: never;
path: {
product_id: number;
};
query?: never;
url: '/cart/remove/{product_id}';
};
export type CartRemoveFromCartErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type CartRemoveFromCartError = CartRemoveFromCartErrors[keyof CartRemoveFromCartErrors];
export type CartRemoveFromCartResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type CartUpdateCountInCartData = {
body?: never;
path: {
product_id: number;
};
query: {
/**
* Count must be provided
*/
count: number;
};
url: '/cart/update/{product_id}';
};
export type CartUpdateCountInCartErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type CartUpdateCountInCartError = CartUpdateCountInCartErrors[keyof CartUpdateCountInCartErrors];
export type CartUpdateCountInCartResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type CartPurchaseData = {
body?: never;
path?: never;
query?: never;
url: '/cart/purchase';
};
export type CartPurchaseResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type UserDeleteUserData = {
body?: never;
path?: never;
query?: never;
url: '/user/delete';
};
export type UserDeleteUserResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type UserLogoutData = {
body?: never;
path?: never;
query?: never;
url: '/user/logout';
};
export type UserLogoutResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type UserRegisterData = {
body: UserRegister;
path?: never;
query?: never;
url: '/user/register';
};
export type UserRegisterErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type UserRegisterError = UserRegisterErrors[keyof UserRegisterErrors];
export type UserRegisterResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type UserUpdateUserData = {
body: {
[key: string]: unknown;
};
path?: never;
query?: never;
url: '/user/update';
};
export type UserUpdateUserErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type UserUpdateUserError = UserUpdateUserErrors[keyof UserUpdateUserErrors];
export type UserUpdateUserResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type UtilsHealthCheckData = {
body?: never;
path?: never;
query?: never;
url: '/utils/health-check/';
};
export type UtilsHealthCheckResponses = {
/**
* Successful Response
*/
200: boolean;
};
export type UtilsHealthCheckResponse = UtilsHealthCheckResponses[keyof UtilsHealthCheckResponses];
export type UtilsTestDbData = {
body?: never;
path?: never;
query?: never;
url: '/utils/test-db/';
};
export type UtilsTestDbResponses = {
/**
* Successful Response
*/
200: boolean;
};
export type UtilsTestDbResponse = UtilsTestDbResponses[keyof UtilsTestDbResponses];
export type LoginLoginAccessTokenData = {
body: BodyLoginLoginAccessToken;
path?: never;
query?: never;
url: '/login/access-token';
};
export type LoginLoginAccessTokenErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type LoginLoginAccessTokenError = LoginLoginAccessTokenErrors[keyof LoginLoginAccessTokenErrors];
export type LoginLoginAccessTokenResponses = {
/**
* Successful Response
*/
200: Token;
};
export type LoginLoginAccessTokenResponse = LoginLoginAccessTokenResponses[keyof LoginLoginAccessTokenResponses];
export type ShopLoginAccessTokenData = {
body: BodyShopLoginAccessToken;
path?: never;
query?: never;
url: '/shop/{shop_uuid}/login/access-token';
};
export type ShopLoginAccessTokenErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type ShopLoginAccessTokenError = ShopLoginAccessTokenErrors[keyof ShopLoginAccessTokenErrors];
export type ShopLoginAccessTokenResponses = {
/**
* Successful Response
*/
200: Token;
};
export type ShopLoginAccessTokenResponse = ShopLoginAccessTokenResponses[keyof ShopLoginAccessTokenResponses];
export type ShopDeleteUserData = {
body?: never;
path: {
shop_uuid: unknown;
};
query?: never;
url: '/shop/{shop_uuid}/user/delete';
};
export type ShopDeleteUserErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type ShopDeleteUserError = ShopDeleteUserErrors[keyof ShopDeleteUserErrors];
export type ShopDeleteUserResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type ShopLogoutData = {
body?: never;
path?: never;
query?: never;
url: '/shop/{shop_uuid}/user/logout';
};
export type ShopLogoutResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type ShopRegisterData = {
body: UserRegister;
path: {
shop_uuid: unknown;
};
query?: never;
url: '/shop/{shop_uuid}/user/register';
};
export type ShopRegisterErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type ShopRegisterError = ShopRegisterErrors[keyof ShopRegisterErrors];
export type ShopRegisterResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type ShopUpdateUserData = {
body: {
[key: string]: unknown;
};
path?: never;
query?: never;
url: '/shop/{shop_uuid}/user/update';
};
export type ShopUpdateUserErrors = {
/**
* Validation Error
*/
422: HttpValidationError;
};
export type ShopUpdateUserError = ShopUpdateUserErrors[keyof ShopUpdateUserErrors];
export type ShopUpdateUserResponses = {
/**
* Successful Response
*/
200: unknown;
};
export type ClientOptions = {
baseURL: 'http://localhost:8000' | (string & {});
};

View File

@ -3,7 +3,6 @@ import { z } from "zod";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { Link } from "@tanstack/react-router";
import { IconBrandFacebook, IconBrandGithub } from "@tabler/icons-react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import {
@ -47,7 +46,6 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
function onSubmit(data: z.infer<typeof formSchema>) {
setIsLoading(true);
// eslint-disable-next-line no-console
console.log(data);
setTimeout(() => {
@ -101,28 +99,6 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">
Or continue with
</span>
</div>
</div>
<div className="flex items-center gap-2">
<Button
variant="outline"
className="w-full"
type="button"
disabled={isLoading}>
<IconBrandGithub className="h-4 w-4" /> GitHub
</Button>
<Button
variant="outline"
className="w-full"
type="button"
disabled={isLoading}>
<IconBrandFacebook className="h-4 w-4" /> Facebook
</Button>
</div>
</div>
</form>