@pradip1995/commerce-auth 3.0.2 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pradip1995/commerce-auth",
3
- "version": "3.0.2",
3
+ "version": "3.1.2",
4
4
  "description": "Medusa storefront authentication — login, register, OTP, Google OAuth",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,11 +1,12 @@
1
1
  "use client"
2
2
 
3
- import { useState } from "react"
3
+ import { Suspense, useState } from "react"
4
4
 
5
5
  import { LOGIN_VIEW } from "@core/types/account"
6
6
  import Login from "@modules/account/components/login"
7
7
  import Register from "@modules/account/components/register"
8
8
  import ForgotPassword from "@modules/account/components/forgot-password"
9
+ import Spinner from "@modules/common/icons/spinner"
9
10
  export { LOGIN_VIEW }
10
11
 
11
12
  const LoginTemplate = () => {
@@ -33,7 +34,15 @@ const LoginTemplate = () => {
33
34
  className="w-full bg-page-bg rounded-2xl shadow-lg p-4 min-[340px]:p-5 min-[550px]:p-6 sm:p-7 md:p-8"
34
35
  style={{ maxWidth: "560px" }}
35
36
  >
36
- {renderView()}
37
+ <Suspense
38
+ fallback={
39
+ <div className="flex justify-center py-12">
40
+ <Spinner />
41
+ </div>
42
+ }
43
+ >
44
+ {renderView()}
45
+ </Suspense>
37
46
  </div>
38
47
  </div>
39
48
  </div>