move from hooks

This commit is contained in:
Nate Kelley 2025-03-04 11:59:33 -07:00
parent cbcd6fccb5
commit 265104ff67
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
9 changed files with 6 additions and 15 deletions

View File

@ -1,5 +1,5 @@
import { ResetEmailForm } from '@/components/features/auth/ResetEmailForm';
import { resetPasswordEmailSend } from '@/hooks/supabaseAuthMethods';
import { resetPasswordEmailSend } from '@/server_context/supabaseAuthMethods';
import React from 'react';
export default function ResetPassword(p: { searchParams: { email: string } }) {

View File

@ -1,5 +1,5 @@
import React from 'react';
import { resetPassword } from '@/hooks/supabaseAuthMethods';
import { resetPassword } from '@/server_context/supabaseAuthMethods';
import { redirect } from 'next/navigation';
import { BusterRoutes, createBusterRoute } from '@/routes/busterRoutes';
import { useSupabaseServerContext } from '@/context/Supabase/useSupabaseContext';

View File

@ -20,7 +20,7 @@ import {
signInWithGithub,
signInWithGoogle,
signUp
} from '@/hooks/supabaseAuthMethods';
} from '@/server_context/supabaseAuthMethods';
import { StatusCard } from '@/components/ui/card/StatusCard';
import { SuccessCard } from '@/components/ui/card/SuccessCard';

View File

@ -15,7 +15,7 @@ import { BUSTER_DOCS_URL } from '@/routes/externalRoutes';
import { type DropdownProps, Dropdown } from '@/components/ui/dropdown/Dropdown';
import { AvatarUserButton } from '@/components/ui/avatar/AvatarUserButton';
import { useUserConfigContextSelector } from '@/context/Users';
import { signOut } from '@/hooks/supabaseAuthMethods';
import { signOut } from '@/server_context/supabaseAuthMethods';
export const SidebarUserFooter: React.FC<{}> = () => {
const user = useUserConfigContextSelector((x) => x.user);

View File

@ -7,7 +7,7 @@ import { redirect } from 'next/navigation';
import { BusterRoutes, createBusterRoute } from '@/routes';
import { AppPasswordAccess } from '@controllers/AppPasswordAccess';
import { AppNoPageAccess } from '@controllers/AppNoPageAccess';
import { signInWithAnonymousUser } from '@/hooks/supabaseAuthMethods';
import { signInWithAnonymousUser } from '@/server_context/supabaseAuthMethods';
export type AppAssetCheckLayoutProps = {
metricId?: string;

View File

@ -3,12 +3,10 @@
import { createClient } from '@/context/Supabase/server';
import { redirect } from 'next/navigation';
import { BusterRoutes, createBusterRoute } from '@/routes/busterRoutes/busterRoutes';
import Cookies from 'js-cookie';
import { QueryClient } from '@tanstack/react-query';
export const signOut = async () => {
'use server';
const supabase = await createClient();
const queryClient = new QueryClient();
const { error } = await supabase.auth.signOut();
@ -16,13 +14,6 @@ export const signOut = async () => {
return { error: error.message };
}
setTimeout(() => {
Object.keys(Cookies.get()).forEach((cookieName) => {
Cookies.remove(cookieName);
});
queryClient.clear();
}, 650);
return redirect(
createBusterRoute({
route: BusterRoutes.AUTH_LOGIN