feat: web waitlist modal integration (#1487)
* dev : Updating the limit of the issues in the sidebar and a weight list modal * dev: integrated supabase and implemented web waitlist api endpoint * dev : updated web pro weightlist request * dev: rename typo * dev: web waitlist endpoint update * update: ui fixes * fix: removed supabase from env.example * chore: replaced supabase npm package to cdn * chore: updated supabase req * fix: Handled error status and error message. --------- Co-authored-by: srinivaspendem <you@example.comsrinivaspendem2612@gmail.com> Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
253edebb93
commit
eba2f3820a
10 changed files with 519 additions and 92 deletions
22
apps/app/services/web-waitlist.service.ts
Normal file
22
apps/app/services/web-waitlist.service.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// services
|
||||
import APIService from "services/api.service";
|
||||
|
||||
// types
|
||||
import { IWebWaitListResponse } from "types";
|
||||
|
||||
class WebWailtListServices extends APIService {
|
||||
constructor() {
|
||||
const origin = typeof window !== "undefined" ? window.location.origin || "" : "";
|
||||
super(origin);
|
||||
}
|
||||
|
||||
async create({ email }: { email: string }): Promise<IWebWaitListResponse> {
|
||||
return this.post(`/api/web-waitlist`, { email: email })
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new WebWailtListServices();
|
||||
Loading…
Add table
Add a link
Reference in a new issue