summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-09-05 10:09:08 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-09-05 10:09:08 +0700
commit009aab3dfc5a08f19c8e147f380dc6517b9f6fd1 (patch)
tree7687a64c17357895709f015f07f97e691ebdca92
parent643c1cc2203d05286b94e591f53560eec83e3f14 (diff)
cr icon & uncomment login google
-rw-r--r--src/core/utils/auth.js2
-rw-r--r--src/lib/auth/components/LoginDesktop.jsx8
-rw-r--r--src/lib/auth/components/LoginMobile.jsx24
3 files changed, 23 insertions, 11 deletions
diff --git a/src/core/utils/auth.js b/src/core/utils/auth.js
index a7244747..03b20ae2 100644
--- a/src/core/utils/auth.js
+++ b/src/core/utils/auth.js
@@ -29,7 +29,7 @@ const setAuth = (user) => {
* @returns {boolean} - Returns `true`.
*/
const deleteAuth = async() => {
- // await signOut()
+ await signOut()
deleteCookie('auth')
return true
}
diff --git a/src/lib/auth/components/LoginDesktop.jsx b/src/lib/auth/components/LoginDesktop.jsx
index 838054cd..42fa8896 100644
--- a/src/lib/auth/components/LoginDesktop.jsx
+++ b/src/lib/auth/components/LoginDesktop.jsx
@@ -95,13 +95,13 @@ const LoginDesktop = () => {
{!isLoading ? 'Masuk' : 'Loading...'}
</button>
</form>
- {/* <div className='flex items-center mt-3 mb-3'>
+ <div className='flex items-center mt-3 mb-3'>
<hr className='flex-1' />
<p className='text-gray-400'>ATAU</p>
<hr className='flex-1' />
- </div> */}
+ </div>
- {/* <button
+ <button
type='submit'
className='border border-gray-500 p-2 rounded-md hover:bg-gray-100 w-full mt-2 flex items-center justify-center gap-x-2'
onClick={() => handleGoogle()}
@@ -114,7 +114,7 @@ const LoginDesktop = () => {
height={10}
/>
<p>Masuk dengan Google</p>
- </button> */}
+ </button>
<div className='text-gray_r-11 mt-10'>
Belum punya akun Indoteknik?{' '}
diff --git a/src/lib/auth/components/LoginMobile.jsx b/src/lib/auth/components/LoginMobile.jsx
index 2d6501cd..ed032295 100644
--- a/src/lib/auth/components/LoginMobile.jsx
+++ b/src/lib/auth/components/LoginMobile.jsx
@@ -13,10 +13,19 @@ import BottomPopup from '@/core/components/elements/Popup/BottomPopup'
import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner'
import odooApi from '@/core/api/odooApi'
import { getAuth } from '@/core/utils/auth'
+import PageContent from '@/lib/content/components/PageContent'
const LoginMobile = () => {
- const { handleSubmit, handleChangeInput, isLoading, isValid, alert, emailRef, passwordRef, handleGoogleSubmit } =
- useLogin()
+ const {
+ handleSubmit,
+ handleChangeInput,
+ isLoading,
+ isValid,
+ alert,
+ emailRef,
+ passwordRef,
+ handleGoogleSubmit
+ } = useLogin()
const router = useRouter()
const [query, setQuery] = useState(router?.query?.next || '/')
@@ -91,13 +100,13 @@ const LoginMobile = () => {
{!isLoading ? 'Masuk' : 'Loading...'}
</button>
</form>
- {/* <div className='flex items-center mt-3 mb-3'>
+ <div className='flex items-center mt-3 mb-3'>
<hr className='flex-1' />
<p className='text-gray-400'>ATAU</p>
<hr className='flex-1' />
- </div> */}
+ </div>
- {/* <button
+ <button
type='submit'
className='border border-gray-500 p-2 rounded-md hover:bg-gray-100 w-full mt-2 flex items-center justify-center gap-x-2'
onClick={() => handleGoogle()}
@@ -110,7 +119,7 @@ const LoginMobile = () => {
height={10}
/>
<p>Masuk dengan Google</p>
- </button> */}
+ </button>
<div className='text-gray_r-11 mt-4'>
Belum punya akun Indoteknik?{' '}
@@ -118,6 +127,9 @@ const LoginMobile = () => {
Daftar
</Link>
</div>
+ {/* <div className='mt-5'>
+ <PageContent path='/login' />
+ </div> */}
</div>
</MobileView>
)