I verified the env ids from appWrite. Now the storeUser function is not hitting the collection either and its not throwing any errors. Here's my client file:
import {Account, Client, Databases, Storage} from "appwrite";
export const appwriteConfig = {
endpointUrl: import.meta.env.VITE_APPWRITE_API_ENDPOINT,
projectId: import.meta.env.VITE_APPWRITE_PROJECT_ID,
apiKey: import.meta.env.VITE_APPWRITE_API_KEY,
databaseId: import.meta.env.VITE_APPWRITE_DATABASE_ID,
userCollectionId: import.meta.env.VITE_APPWRITE_USERS_COLLETION_ID,
tripCollectionId: import.meta.env.VITE_APPWRITE_TRIPS_COLLECTION_ID
}
const client = new Client()
.setEndpoint(appwriteConfig.endpointUrl)
.setProject(appwriteConfig.projectId)
const account = new Account(client);
const database = new Databases(client);
const storage = new Storage(client);
export { client, account, database, storage };
Here's a link to my repo:
https://github.com/soulfisher/travel-agency-dashboard