Skip to content

/app/page.tsx #23

Description

@sanyogitayadavvkaps

Current user is coming null. Always I have setup Supa base and updated the file, still current user is coming null.

const getCurrentUser = async (userId: string) => {
try {
const { data: profile, error } = await supabaseClient
.from('profiles')
.select('*')
.eq('id', userId)

        if (error) {
            throw error;
        }

        if (profile) {
            setCurrentUser(profile[0]);
        }
    } catch (error) {
        console.error('Error fetching user profile:', error);
    }
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions