style: reformat files
This commit is contained in:
parent
657a64ca7f
commit
2a2c4bc967
87 changed files with 571 additions and 307 deletions
|
@ -1,21 +1,16 @@
|
|||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import {
|
||||
useDeleteApiEventEventID,
|
||||
useGetApiEventEventID,
|
||||
} from '@/generated/api/event/event';
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
import { RedirectButton } from '@/components/buttons/redirect-button';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import ParticipantListEntry from '@/components/custom-ui/participant-list-entry';
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { ToastInner } from '@/components/misc/toast-inner';
|
||||
import React, { useState } from 'react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { RedirectButton } from '@/components/buttons/redirect-button';
|
||||
import ParticipantListEntry from '@/components/custom-ui/participant-list-entry';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { ToastInner } from '@/components/misc/toast-inner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
@ -25,6 +20,13 @@ import {
|
|||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@/components/ui/dialog';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
import {
|
||||
useDeleteApiEventEventID,
|
||||
useGetApiEventEventID,
|
||||
} from '@/generated/api/event/event';
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
|
||||
export default function ShowEvent() {
|
||||
const session = useSession();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
import EventForm from '@/components/forms/event-form';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import EventForm from '@/components/forms/event-form';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
import EventForm from '@/components/forms/event-form';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
import EventForm from '@/components/forms/event-form';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
|
||||
export default function NewEvent() {
|
||||
return (
|
||||
<div className='flex flex-col items-center justify-center h-screen'>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import { RedirectButton } from '@/components/buttons/redirect-button';
|
||||
import EventListEntry from '@/components/custom-ui/event-list-entry';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
import { useGetApiEvent } from '@/generated/api/event/event';
|
||||
|
||||
export default function Events() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import Calendar from '@/components/calendar';
|
||||
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
|
||||
export default function Home() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import { cookies } from 'next/headers';
|
||||
import React from 'react';
|
||||
|
||||
import { AppSidebar } from '@/components/custom-ui/app-sidebar';
|
||||
import SidebarProviderWrapper from '@/components/wrappers/sidebar-provider';
|
||||
import Header from '@/components/misc/header';
|
||||
import SidebarProviderWrapper from '@/components/wrappers/sidebar-provider';
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { getApiDocs } from '@/lib/swagger';
|
||||
|
||||
import ReactSwagger from './react-swagger';
|
||||
|
||||
export default async function IndexPage() {
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
import { z } from 'zod/v4';
|
||||
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
import {
|
||||
userCalendarQuerySchema,
|
||||
UserCalendarResponseSchema,
|
||||
UserCalendarSchema,
|
||||
} from './validation';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
import { z } from 'zod/v4';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import {
|
||||
UserCalendarResponseSchema,
|
||||
UserCalendarSchema,
|
||||
userCalendarQuerySchema,
|
||||
} from './validation';
|
||||
|
||||
export const GET = auth(async function GET(req) {
|
||||
const authCheck = userAuthenticated(req);
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import {
|
||||
userCalendarQuerySchema,
|
||||
UserCalendarResponseSchema,
|
||||
} from './validation';
|
||||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
|
||||
import {
|
||||
notAuthenticatedResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
|
||||
import {
|
||||
UserCalendarResponseSchema,
|
||||
userCalendarQuerySchema,
|
||||
} from './validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
eventEndTimeSchema,
|
||||
EventSchema,
|
||||
eventEndTimeSchema,
|
||||
eventStartTimeSchema,
|
||||
} from '@/app/api/event/validation';
|
||||
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
import { prisma } from '@/prisma';
|
||||
import { auth } from '@/auth';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
SuccessResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import {
|
||||
ParticipantResponseSchema,
|
||||
updateParticipantSchema,
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
import {
|
||||
ParticipantResponseSchema,
|
||||
updateParticipantSchema,
|
||||
} from '../validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
serverReturnedDataValidationErrorResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import {
|
||||
EventIdParamSchema,
|
||||
UserIdParamSchema,
|
||||
SuccessResponseSchema,
|
||||
UserIdParamSchema,
|
||||
} from '@/app/api/validation';
|
||||
|
||||
import {
|
||||
ParticipantResponseSchema,
|
||||
updateParticipantSchema,
|
||||
} from '../validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
import { prisma } from '@/prisma';
|
||||
import { auth } from '@/auth';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import {
|
||||
inviteParticipantSchema,
|
||||
ParticipantResponseSchema,
|
||||
ParticipantsResponseSchema,
|
||||
inviteParticipantSchema,
|
||||
} from './validation';
|
||||
|
||||
export const GET = auth(async (req, { params }) => {
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
import {
|
||||
ParticipantsResponseSchema,
|
||||
ParticipantResponseSchema,
|
||||
inviteParticipantSchema,
|
||||
} from './validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
serverReturnedDataValidationErrorResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import { EventIdParamSchema } from '@/app/api/validation';
|
||||
|
||||
import {
|
||||
ParticipantResponseSchema,
|
||||
ParticipantsResponseSchema,
|
||||
inviteParticipantSchema,
|
||||
} from './validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
existingUserIdServerSchema,
|
||||
PublicUserSchema,
|
||||
existingUserIdServerSchema,
|
||||
} from '@/app/api/user/validation';
|
||||
|
||||
extendZodWithOpenApi(zod);
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import { prisma } from '@/prisma';
|
||||
import { auth } from '@/auth';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
SuccessResponseSchema,
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import { EventResponseSchema, updateEventSchema } from '../validation';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
serverReturnedDataValidationErrorResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import {
|
||||
EventIdParamSchema,
|
||||
SuccessResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { EventResponseSchema, updateEventSchema } from '../validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import { prisma } from '@/prisma';
|
||||
import { auth } from '@/auth';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { ErrorResponseSchema, ZodErrorResponseSchema } from '../validation';
|
||||
import {
|
||||
createEventSchema,
|
||||
EventResponseSchema,
|
||||
EventsResponseSchema,
|
||||
createEventSchema,
|
||||
} from './validation';
|
||||
|
||||
export const GET = auth(async (req) => {
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import {
|
||||
EventResponseSchema,
|
||||
EventsResponseSchema,
|
||||
createEventSchema,
|
||||
} from './validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
|
@ -11,6 +7,12 @@ import {
|
|||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import {
|
||||
EventResponseSchema,
|
||||
EventsResponseSchema,
|
||||
createEventSchema,
|
||||
} from './validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
existingUserIdServerSchema,
|
||||
PublicUserSchema,
|
||||
existingUserIdServerSchema,
|
||||
} from '../user/validation';
|
||||
import { ParticipantSchema } from './[eventID]/participant/validation';
|
||||
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
import { searchUserSchema, searchUserResponseSchema } from './validation';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { searchUserResponseSchema, searchUserSchema } from './validation';
|
||||
|
||||
export const GET = auth(async function GET(req) {
|
||||
const authCheck = userAuthenticated(req);
|
||||
if (!authCheck.continue)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import { searchUserResponseSchema, searchUserSchema } from './validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
|
@ -7,6 +7,8 @@ import {
|
|||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import { searchUserResponseSchema, searchUserSchema } from './validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
method: 'get',
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import zod from 'zod/v4';
|
||||
|
||||
import { PublicUserSchema } from '../../user/validation';
|
||||
|
||||
export const searchUserSchema = zod.object({
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
import { PublicUserResponseSchema } from '../validation';
|
||||
|
||||
import { ErrorResponseSchema } from '@/app/api/validation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { PublicUserResponseSchema } from '../validation';
|
||||
|
||||
export const GET = auth(async function GET(req, { params }) {
|
||||
const authCheck = userAuthenticated(req);
|
||||
if (!authCheck.continue)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import { PublicUserResponseSchema } from '../validation';
|
||||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
notAuthenticatedResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { UserIdParamSchema } from '../../validation';
|
||||
import { PublicUserResponseSchema } from '../validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
import { updateUserPasswordServerSchema } from '../validation';
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
import { FullUserResponseSchema } from '../../validation';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
import bcrypt from 'bcryptjs';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { FullUserResponseSchema } from '../../validation';
|
||||
import { updateUserPasswordServerSchema } from '../validation';
|
||||
|
||||
export const PATCH = auth(async function PATCH(req) {
|
||||
const authCheck = userAuthenticated(req);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import { FullUserResponseSchema } from '../../validation';
|
||||
import { updateUserPasswordServerSchema } from '../validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
|
@ -8,6 +7,9 @@ import {
|
|||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import { FullUserResponseSchema } from '../../validation';
|
||||
import { updateUserPasswordServerSchema } from '../validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
method: 'patch',
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
import { updateUserServerSchema } from './validation';
|
||||
import {
|
||||
returnZodTypeCheckedResponse,
|
||||
userAuthenticated,
|
||||
} from '@/lib/apiHelpers';
|
||||
import { FullUserResponseSchema } from '../validation';
|
||||
|
||||
import {
|
||||
ErrorResponseSchema,
|
||||
SuccessResponseSchema,
|
||||
ZodErrorResponseSchema,
|
||||
} from '@/app/api/validation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { FullUserResponseSchema } from '../validation';
|
||||
import { updateUserServerSchema } from './validation';
|
||||
|
||||
export const GET = auth(async function GET(req) {
|
||||
const authCheck = userAuthenticated(req);
|
||||
if (!authCheck.continue)
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import { OpenAPIRegistry } from '@asteasolutions/zod-to-openapi';
|
||||
import { FullUserResponseSchema } from '../validation';
|
||||
import { updateUserServerSchema } from './validation';
|
||||
|
||||
import {
|
||||
invalidRequestDataResponse,
|
||||
notAuthenticatedResponse,
|
||||
serverReturnedDataValidationErrorResponse,
|
||||
userNotFoundResponse,
|
||||
} from '@/lib/defaultApiResponses';
|
||||
|
||||
import { SuccessResponseSchema } from '../../validation';
|
||||
import { FullUserResponseSchema } from '../validation';
|
||||
import { updateUserServerSchema } from './validation';
|
||||
|
||||
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
|
||||
registry.registerPath({
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
firstNameSchema,
|
||||
lastNameSchema,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import { prisma } from '@/prisma';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { allTimeZones } from '@/lib/timezones';
|
||||
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
extendZodWithOpenApi(zod);
|
||||
|
||||
// ----------------------------------------
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { registry } from '@/lib/swagger';
|
||||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { registry } from '@/lib/swagger';
|
||||
|
||||
extendZodWithOpenApi(zod);
|
||||
|
||||
export const ErrorResponseSchema = zod
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import type { Metadata } from 'next';
|
||||
import { SessionProvider } from 'next-auth/react';
|
||||
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { QueryProvider } from '@/components/wrappers/query-provider';
|
||||
import { ThemeProvider } from '@/components/wrappers/theme-provider';
|
||||
|
||||
import type { Metadata } from 'next';
|
||||
import './globals.css';
|
||||
import { QueryProvider } from '@/components/wrappers/query-provider';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { SessionProvider } from 'next-auth/react';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'MeetUp',
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
import { auth, providerMap } from '@/auth';
|
||||
import SSOLogin from '@/components/buttons/sso-login-button';
|
||||
import LoginForm from '@/components/forms/login-form';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import Image from 'next/image';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import SSOLogin from '@/components/buttons/sso-login-button';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardHeader,
|
||||
} from '@/components/custom-ui/login-card';
|
||||
import LoginForm from '@/components/forms/login-form';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { ThemePicker } from '@/components/misc/theme-picker';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
HoverCard,
|
||||
HoverCardTrigger,
|
||||
HoverCardContent,
|
||||
HoverCardTrigger,
|
||||
} from '@/components/ui/hover-card';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
|
||||
import { auth, providerMap } from '@/auth';
|
||||
|
||||
export default async function LoginPage() {
|
||||
const session = await auth();
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { signOut } from '@/auth';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Card,
|
||||
|
@ -8,6 +7,8 @@ import {
|
|||
CardTitle,
|
||||
} from '@/components/ui/card';
|
||||
|
||||
import { signOut } from '@/auth';
|
||||
|
||||
export default function SignOutPage() {
|
||||
return (
|
||||
<div className='flex flex-col items-center justify-center h-screen'>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { auth } from '@/auth';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import { auth } from '@/auth';
|
||||
|
||||
export default async function Home() {
|
||||
const session = await auth();
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@ import {
|
|||
} from '@/components/ui/card';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
|
@ -19,6 +16,9 @@ import {
|
|||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll';
|
||||
|
||||
export default function SettingsPage() {
|
||||
return (
|
||||
|
|
15
src/auth.ts
15
src/auth.ts
|
@ -1,22 +1,21 @@
|
|||
import { PrismaAdapter } from '@auth/prisma-adapter';
|
||||
import NextAuth, { CredentialsSignin } from 'next-auth';
|
||||
|
||||
import { Prisma } from '@/generated/prisma';
|
||||
import type { Provider } from 'next-auth/providers';
|
||||
|
||||
import Credentials from 'next-auth/providers/credentials';
|
||||
import AuthentikProvider from 'next-auth/providers/authentik';
|
||||
import Credentials from 'next-auth/providers/credentials';
|
||||
import DiscordProvider from 'next-auth/providers/discord';
|
||||
import FacebookProvider from 'next-auth/providers/facebook';
|
||||
import GithubProvider from 'next-auth/providers/github';
|
||||
import GitlabProvider from 'next-auth/providers/gitlab';
|
||||
import GoogleProvider from 'next-auth/providers/google';
|
||||
import KeycloakProvider from 'next-auth/providers/keycloak';
|
||||
|
||||
import { PrismaAdapter } from '@auth/prisma-adapter';
|
||||
import { prisma } from '@/prisma';
|
||||
import { ZodError } from 'zod/v4';
|
||||
|
||||
import { loginSchema } from '@/lib/auth/validation';
|
||||
import { ZodError } from 'zod/v4';
|
||||
|
||||
import { Prisma } from '@/generated/prisma';
|
||||
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
class InvalidLoginError extends CredentialsSignin {
|
||||
constructor(code: string) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Button } from '@/components/ui/button';
|
||||
|
||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
export function IconButton({
|
||||
icon,
|
||||
children,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { NDot, NotificationDot } from '@/components/misc/notification-dot';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import { NDot, NotificationDot } from '@/components/misc/notification-dot';
|
||||
|
||||
export function NotificationButton({
|
||||
dotVariant,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Button } from '@/components/ui/button';
|
||||
import Link from 'next/link';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
export function RedirectButton({
|
||||
redirectUrl,
|
||||
buttonText,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { signIn } from '@/auth';
|
||||
import { IconButton } from '@/components/buttons/icon-button';
|
||||
import { faOpenid } from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
import { IconButton } from '@/components/buttons/icon-button';
|
||||
|
||||
import { signIn } from '@/auth';
|
||||
|
||||
export default function SSOLogin({
|
||||
provider,
|
||||
providerDisplayName,
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
'use client';
|
||||
|
||||
import { QueryErrorResetBoundary } from '@tanstack/react-query';
|
||||
import moment from 'moment';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React from 'react';
|
||||
import { Calendar as RBCalendar, momentLocalizer } from 'react-big-calendar';
|
||||
import withDragAndDrop from 'react-big-calendar/lib/addons/dragAndDrop';
|
||||
import moment from 'moment';
|
||||
import '@/components/react-big-calendar.css';
|
||||
import 'react-big-calendar/lib/addons/dragAndDrop/styles.css';
|
||||
import CustomToolbar from '@/components/custom-toolbar';
|
||||
import React from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { usePatchApiEventEventID } from '@/generated/api/event/event';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import { UserCalendarSchemaItem } from '@/generated/api/meetup.schemas';
|
||||
import { QueryErrorResetBoundary } from '@tanstack/react-query';
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { fromZodIssue } from 'zod-validation-error/v4';
|
||||
import type { $ZodIssue } from 'zod/v4/core';
|
||||
|
||||
import CustomToolbar from '@/components/custom-toolbar';
|
||||
import '@/components/react-big-calendar.css';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
import { useGetApiCalendar } from '@/generated/api/calendar/calendar';
|
||||
import { usePatchApiEventEventID } from '@/generated/api/event/event';
|
||||
import { UserCalendarSchemaItem } from '@/generated/api/meetup.schemas';
|
||||
|
||||
moment.updateLocale('en', {
|
||||
week: {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import './custom-toolbar.css';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { NavigateAction } from 'react-big-calendar';
|
||||
import DatePicker from 'react-datepicker';
|
||||
import 'react-datepicker/dist/react-datepicker.css';
|
||||
import { NavigateAction } from 'react-big-calendar';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
import './custom-toolbar.css';
|
||||
|
||||
interface CustomToolbarProps {
|
||||
//Aktuell angezeigtes Datum
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
'use client';
|
||||
|
||||
import { ChevronDown } from 'lucide-react';
|
||||
import {
|
||||
CalendarClock,
|
||||
CalendarDays,
|
||||
CalendarPlus,
|
||||
Star,
|
||||
User,
|
||||
Users,
|
||||
} from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import React from 'react';
|
||||
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
|
@ -13,27 +24,13 @@ import {
|
|||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
} from '@/components/custom-ui/sidebar';
|
||||
|
||||
import { ChevronDown } from 'lucide-react';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import {
|
||||
Collapsible,
|
||||
CollapsibleContent,
|
||||
CollapsibleTrigger,
|
||||
} from '@/components/ui/collapsible';
|
||||
|
||||
import Logo from '@/components/misc/logo';
|
||||
|
||||
import Link from 'next/link';
|
||||
|
||||
import {
|
||||
Star,
|
||||
CalendarDays,
|
||||
User,
|
||||
Users,
|
||||
CalendarClock,
|
||||
CalendarPlus,
|
||||
} from 'lucide-react';
|
||||
|
||||
const items = [
|
||||
{
|
||||
title: 'Calendar',
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
'use client';
|
||||
|
||||
import { Card } from '@/components/ui/card';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import Link from 'next/link';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
import { EventSchema } from '@/app/api/event/validation';
|
||||
import { useSession } from 'next-auth/react';
|
||||
|
||||
import { usePatchApiEventEventIDParticipantUser } from '@/generated/api/event-participant/event-participant';
|
||||
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
|
@ -14,7 +19,6 @@ import {
|
|||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '../ui/select';
|
||||
import { usePatchApiEventEventIDParticipantUser } from '@/generated/api/event-participant/event-participant';
|
||||
|
||||
type EventListEntryProps = zod.output<typeof EventSchema>;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import React from 'react';
|
||||
import Image from 'next/image';
|
||||
import { user_default_dark } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { user_default_light } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { useTheme } from 'next-themes';
|
||||
import Image from 'next/image';
|
||||
import React from 'react';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { ParticipantSchema } from '@/app/api/event/[eventID]/participant/validation';
|
||||
|
||||
type ParticipantListEntryProps = zod.output<typeof ParticipantSchema>;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { Slot } from '@radix-ui/react-slot';
|
||||
import { cva, VariantProps } from 'class-variance-authority';
|
||||
import { PanelLeftIcon } from 'lucide-react';
|
||||
|
||||
import { useIsMobile } from '@/hooks/use-mobile';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Slot } from '@radix-ui/react-slot';
|
||||
import { VariantProps, cva } from 'class-variance-authority';
|
||||
import { PanelLeftIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
|
@ -25,6 +24,8 @@ import {
|
|||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
||||
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
||||
const SIDEBAR_WIDTH = '16rem';
|
||||
|
|
|
@ -1,27 +1,30 @@
|
|||
'use client';
|
||||
import React from 'react';
|
||||
import LabeledInput from '@/components/custom-ui/labeled-input';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import TimePicker from '@/components/time-picker';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
import {
|
||||
usePostApiEvent,
|
||||
useGetApiEventEventID,
|
||||
usePatchApiEventEventID,
|
||||
} from '@/generated/api/event/event';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import React from 'react';
|
||||
import { toast } from 'sonner';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import Calendar from '@/components/calendar';
|
||||
import LabeledInput from '@/components/custom-ui/labeled-input';
|
||||
import Logo from '@/components/misc/logo';
|
||||
import { ToastInner } from '@/components/misc/toast-inner';
|
||||
import { UserSearchInput } from '@/components/misc/user-search';
|
||||
import ParticipantListEntry from '../custom-ui/participant-list-entry';
|
||||
import TimePicker from '@/components/time-picker';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
import zod from 'zod/v4';
|
||||
import { PublicUserSchema } from '@/app/api/user/validation';
|
||||
import Calendar from '@/components/calendar';
|
||||
|
||||
import {
|
||||
useGetApiEventEventID,
|
||||
usePatchApiEventEventID,
|
||||
usePostApiEvent,
|
||||
} from '@/generated/api/event/event';
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
|
||||
import ParticipantListEntry from '../custom-ui/participant-list-entry';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
'use client';
|
||||
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
import LabeledInput from '@/components/custom-ui/labeled-input';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import useZodForm from '@/lib/hooks/useZodForm';
|
||||
import { loginSchema, registerSchema } from '@/lib/auth/validation';
|
||||
|
||||
import { loginAction } from '@/lib/auth/login';
|
||||
import { registerAction } from '@/lib/auth/register';
|
||||
import { loginSchema, registerSchema } from '@/lib/auth/validation';
|
||||
import useZodForm from '@/lib/hooks/useZodForm';
|
||||
|
||||
function LoginFormElement({
|
||||
setIsSignUp,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { BellRing, Inbox } from 'lucide-react';
|
||||
|
||||
import { NotificationButton } from '@/components/buttons/notification-button';
|
||||
import { SidebarTrigger } from '@/components/custom-ui/sidebar';
|
||||
import { ThemePicker } from '@/components/misc/theme-picker';
|
||||
import { NotificationButton } from '@/components/buttons/notification-button';
|
||||
|
||||
import { BellRing, Inbox } from 'lucide-react';
|
||||
import UserDropdown from '@/components/misc/user-dropdown';
|
||||
|
||||
const items = [
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
'use client';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import Image, { ImageProps } from 'next/image';
|
||||
|
||||
import * as logoAssets from '@/assets/logo/logo-export';
|
||||
import { useTheme } from 'next-themes';
|
||||
import Image, { ImageProps } from 'next/image';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
type ColorType = 'colored' | 'monochrome';
|
||||
type LogoType = 'combo' | 'primary' | 'secondary' | 'submark';
|
||||
|
|
|
@ -9,6 +9,12 @@ import {
|
|||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
|
||||
import {
|
||||
SidebarMenu,
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from '@/components/custom-ui/sidebar';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
@ -19,12 +25,6 @@ import {
|
|||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import {
|
||||
SidebarMenu,
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from '@/components/custom-ui/sidebar';
|
||||
|
||||
export function NavUser({
|
||||
user,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { cn } from '@/lib/utils';
|
||||
import { cva, type VariantProps } from 'class-variance-authority';
|
||||
import { type VariantProps, cva } from 'class-variance-authority';
|
||||
import { CircleSmall } from 'lucide-react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const dotVariants = cva('', {
|
||||
variants: {
|
||||
variant: {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
import { ThemePicker } from '@/components/misc/theme-picker';
|
||||
import { ThemeProvider } from '@/components/wrappers/theme-provider';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { Moon, Sun } from 'lucide-react';
|
||||
import { useTheme } from 'next-themes';
|
||||
import * as React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
|
|
|
@ -39,12 +39,54 @@ import { Button } from '@/components/ui/button';
|
|||
|
||||
'use client';
|
||||
|
||||
import { toast } from 'sonner';
|
||||
import { X } from 'lucide-react';
|
||||
import React from 'react';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import * as Icons from 'lucide-react';
|
||||
import React from 'react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
/*
|
||||
USAGE:
|
||||
|
||||
import { ToastInner } from '@/components/misc/toast-inner';
|
||||
|
||||
|
||||
<Button
|
||||
variant='outline_primary'
|
||||
onClick={() =>
|
||||
|
||||
|
||||
toast.custom(
|
||||
(t) => (
|
||||
<ToastInner
|
||||
toastId={t}
|
||||
title=''
|
||||
description=''
|
||||
onAction={() => console.log('on Action')} //No Button shown if this is null
|
||||
variant=''default' | 'success' | 'error' | 'info' | 'warning' | 'notification''
|
||||
buttonText=[No Button shown if this is null]
|
||||
iconName=[Any Icon Name from Lucide in UpperCamelCase or default if null]
|
||||
/>
|
||||
),
|
||||
|
||||
|
||||
{
|
||||
duration: 5000,
|
||||
},
|
||||
)
|
||||
}
|
||||
>
|
||||
Show Toast
|
||||
</Button>
|
||||
|
||||
|
||||
*/
|
||||
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
interface ToastInnerProps {
|
||||
title: string;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import Image from 'next/image';
|
||||
import { User } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
|
||||
export default function UserCard() {
|
||||
const { data } = useGetApiUserMe();
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
'use client';
|
||||
|
||||
import { ChevronDown, User } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
|
||||
import UserCard from '@/components/misc/user-card';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
|
@ -9,11 +14,8 @@ import {
|
|||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
|
||||
import { useGetApiUserMe } from '@/generated/api/user/user';
|
||||
import { ChevronDown, User } from 'lucide-react';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import UserCard from '@/components/misc/user-card';
|
||||
|
||||
export default function UserDropdown() {
|
||||
const { data } = useGetApiUserMe();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Command,
|
||||
|
@ -18,10 +18,13 @@ import {
|
|||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
} from '@/components/ui/popover';
|
||||
import { useGetApiSearchUser } from '@/generated/api/search/search';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import { PublicUserSchema } from '@/app/api/user/validation';
|
||||
|
||||
import { useGetApiSearchUser } from '@/generated/api/search/search';
|
||||
|
||||
type User = zod.output<typeof PublicUserSchema>;
|
||||
|
||||
export function UserSearchInput({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { ChevronDownIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Calendar } from '@/components/ui/calendar';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
import { Slot } from '@radix-ui/react-slot';
|
||||
import { cva, type VariantProps } from 'class-variance-authority';
|
||||
import { type VariantProps, cva } from 'class-variance-authority';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import {
|
||||
ChevronDownIcon,
|
||||
ChevronLeftIcon,
|
||||
ChevronRightIcon,
|
||||
} from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
import { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button, buttonVariants } from '@/components/ui/button';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
function Calendar({
|
||||
className,
|
||||
classNames,
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { Command as CommandPrimitive } from 'cmdk';
|
||||
import { SearchIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
@ -13,6 +12,8 @@ import {
|
|||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
function Command({
|
||||
className,
|
||||
...props
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { XIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
||||
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as LabelPrimitive from '@radix-ui/react-label';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SelectPrimitive from '@radix-ui/react-select';
|
||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
||||
import { XIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import { useTheme } from 'next-themes';
|
||||
import { Toaster as Sonner, ToasterProps } from 'sonner';
|
||||
import React from 'react';
|
||||
import { Toaster as Sonner, ToasterProps } from 'sonner';
|
||||
|
||||
const Toaster = ({ ...props }: ToasterProps) => {
|
||||
const { theme = 'system' } = useTheme();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { SidebarProvider } from '../custom-ui/sidebar';
|
||||
|
||||
export default function SidebarProviderWrapper({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
||||
import * as React from 'react';
|
||||
|
||||
export function ThemeProvider({
|
||||
children,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { NextAuthRequest } from 'next-auth';
|
||||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
|
||||
import zod from 'zod/v4';
|
||||
import { NextAuthRequest } from 'next-auth';
|
||||
import { NextResponse } from 'next/server';
|
||||
import zod from 'zod/v4';
|
||||
|
||||
extendZodWithOpenApi(zod);
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
'use server';
|
||||
|
||||
import { z } from 'zod/v4';
|
||||
import { loginSchema } from './validation';
|
||||
|
||||
import { signIn } from '@/auth';
|
||||
|
||||
import { loginSchema } from './validation';
|
||||
|
||||
export async function loginAction(data: z.infer<typeof loginSchema>) {
|
||||
try {
|
||||
await signIn('credentials', {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
'use server';
|
||||
|
||||
import type { z } from 'zod/v4';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import { registerServerSchema } from './validation';
|
||||
import type { z } from 'zod/v4';
|
||||
|
||||
import { prisma } from '@/prisma';
|
||||
|
||||
import { registerServerSchema } from './validation';
|
||||
|
||||
export async function registerAction(
|
||||
data: z.infer<typeof registerServerSchema>,
|
||||
) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import zod from 'zod/v4';
|
||||
|
||||
import {
|
||||
emailSchema,
|
||||
firstNameSchema,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { clsx, type ClassValue } from 'clsx';
|
||||
import { type ClassValue, clsx } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue