Getting started on Tech Tracker. Added TV Context

This commit is contained in:
2025-06-09 06:59:38 -05:00
parent 5f2d25f9dd
commit cc225fae80
28 changed files with 284 additions and 91 deletions

View File

@ -35,7 +35,7 @@ export const GET = async (request: NextRequest) => {
if (type === 'invite') return redirect('/sign-up');
}
return redirect(
`/?error=${encodeURIComponent(error?.message || 'Unknown error')}`,
`/?error=${encodeURIComponent(error?.message ?? 'Unknown error')}`,
);
}

View File

@ -1,12 +1,12 @@
'use client';
import { useAuth } from '@/components/context/auth';
import { useAuth } from '@/components/context';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import { Loader2 } from 'lucide-react';
const AuthSuccessPage = () => {
const { refreshUserData, isAuthenticated } = useAuth();
const { refreshUserData } = useAuth();
const router = useRouter();
useEffect(() => {

View File

@ -19,7 +19,7 @@ import {
import Link from 'next/link';
import { forgotPassword } from '@/lib/actions';
import { useRouter } from 'next/navigation';
import { useAuth } from '@/components/context/auth';
import { useAuth } from '@/components/context';
import { useEffect, useState } from 'react';
import { StatusMessage, SubmitButton } from '@/components/default';

View File

@ -1,5 +1,5 @@
'use client';
import { useAuth } from '@/components/context/auth';
import { useAuth } from '@/components/context';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import {

View File

@ -20,7 +20,7 @@ import {
import Link from 'next/link';
import { signIn } from '@/lib/actions';
import { useRouter } from 'next/navigation';
import { useAuth } from '@/components/context/auth';
import { useAuth } from '@/components/context';
import { useEffect, useState } from 'react';
import { StatusMessage, SubmitButton } from '@/components/default';
import { Separator } from '@/components/ui';

View File

@ -7,7 +7,7 @@ import Link from 'next/link';
import { signUp } from '@/lib/actions';
import { StatusMessage, SubmitButton } from '@/components/default';
import { useRouter } from 'next/navigation';
import { useAuth } from '@/components/context/auth';
import { useAuth } from '@/components/context';
import {
Card,
CardContent,
@ -26,7 +26,7 @@ import {
import { useEffect, useState } from 'react';
import {
SignInWithApple,
SignInWithMicrosoft
SignInWithMicrosoft,
} from '@/components/default/auth';
const formSchema = z
@ -201,8 +201,8 @@ const SignUp = () => {
<span className='text-sm text-muted-foreground'>or</span>
<Separator className='flex-1 bg-accent py-0.5' />
</div>
<SignInWithMicrosoft type='signUp' />
<SignInWithApple type='signUp' />
<SignInWithMicrosoft />
<SignInWithApple />
</CardContent>
</Card>
);