Compare commits

..

1 Commits

Author SHA1 Message Date
ChineseChikki 590293d561 reset password implemented 2023-01-31 22:59:13 +01:00
5 changed files with 68 additions and 24 deletions
+1
View File
@@ -9,5 +9,6 @@ REACT_APP_APPSITE=" https://myfitapp.mermsemr.com"
REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit"
REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
# REACT_APP_PASSWORD_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser/resetpass"
REACT_APP_SESSION_EXPIRE_MINUTES = 5
@@ -1,10 +1,40 @@
import React from "react";
import { Link } from 'react-router-dom';
import React, { useState, useEffect } from "react";
import { Link, useNavigate } from 'react-router-dom';
import titleShape from "../../../assets/images/shape/title-shape-two.svg";
import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout";
export default function ForgotPassword() {
const navigate = useNavigate();
const [validation, setValidation] = useState("")
const [buttonDisabled, setButtonDisabled] = useState(true)
// email
const [email, setEmail] = useState("");
const handleEmail = (e) => {
setEmail(e.target.value);
};
function validationChecker(email) {
const emailCheck = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
if (email === "") {
setValidation("email is required");
} else if (!email.match(emailCheck)) {
setValidation('Please input a valid email address');
} else {
setValidation("");
setButtonDisabled(false)
}
}
useEffect(() => {
validationChecker(email)
}, [email])
return (
<>
<AuthLayout
@@ -28,19 +58,24 @@ export default function ForgotPassword() {
name="email"
type="email"
iconName="message"
inputHandler={handleEmail}
value={email}
/>
{validation && <p className="my-5 font-bold text-red-500">{validation}</p>}
</div>
<div className="signin-area mb-3.5">
<a
href="/verify-you"
<button
className="w-full rounded-[50px] mb-5 h-[58px] text-xl text-white font-bold flex justify-center bg-purple items-center"
disabled={buttonDisabled}
onClick={() => navigate("/verify-you")}
>
Send Code
</a>
</button>
<Link to="/"
className=" my-40 font-bold flex justify-center text-red-500 items-center"
className="my-40 font-bold flex justify-center text-red-500 items-center"
>
Back to Home
</Link>
+2 -2
View File
@@ -26,7 +26,7 @@ export default function Accordion({ datas }) {
</span>
</div>
<div className="accordion-title w-full">
<p className="text-18 tracking-wide text-dark-gray dark:text-white cursor-default">
<p className="text-18 tracking-wide text-dark-gray dark:text-white">
{datas.title}
</p>
</div>
@@ -35,7 +35,7 @@ export default function Accordion({ datas }) {
<div className="accordion-body-content flex space-x-4 sm:pl-10 pl-5 pt-5">
<div className="w-[3px] h-auto bg-purple rounded-[28px]"></div>
<div className="flex-1">
<p className="text-base text-thin-light-gray tracking-wide cursor-default">
<p className="text-base text-thin-light-gray tracking-wide">
{datas.content}
</p>
</div>
+17 -12
View File
@@ -2,33 +2,38 @@
"datas": [
{
"id": 0,
"title": "What is myFit App?",
"content": "myFit is your personal health care concierge. this app helps you to manage the intricacies of your daily and long term health activities. With myFit, your health record is yours at all point, you decide your provider access as needed from time to time."
"title": "Can I resell an NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game. What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game"
},
{
"id": 1,
"title": "How can I manage my health plan with myFit?",
"content": "myFit learns and help You to keep track of all aspects of your health - physical, mental and emotional. It bestow your unique lifestyle, needs and comprehensive well-being."
"title": "What can you do with an NFT after buying it?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 2,
"title": "What can I track with myFit?",
"content": "myFit automatically keeps track of physical activities, medical status & visits , schedules ,view and cancel appointments. myFit keeps your health in one place and connects you to support a healthier lifestyle."
"title": "Can you lose money on NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 3,
"title": "How can I track with myFit?",
"content": "Open myFit app , add information about your health, goals and save.Under each category of your choosing, select Activity, set a goal , see your progress."
"title": "How does NFT prove ownership?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 4,
"title": "How secure is myFit App?",
"content": "myFit technology works synchronously with information you choose to share and will be encrypted and stored on a dedicated server so that MyFit can provide you with personalized, healthy decisions. MyFit is built to keep your data secure and protect your privacy. Your data is encrypted and you are always in control of your information."
"title": "How can you tell if someone owns an NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 5,
"title": "What kind of device do I need?",
"content": "All you need is iPhone or Android device to enjoy all personalized metrics for personal use. Instant free download from apple and play store."
"title": "Can you lose more than you invest in NFTs?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 6,
"title": "What can you do with an NFT after buying it?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
}
]
}
+6 -3
View File
@@ -15,6 +15,7 @@ class usersService {
return this.postAuxEnd("/login", reqData);
}
getUserReminders(){
return this.getAuxEnd("/reminders", null);
}
@@ -55,14 +56,16 @@ class usersService {
});
}
postAuxEnd(uri, reqData) {
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
const session_token = localStorage.getItem("session_token");
const token = '..your token..'
let axiosConfig = {
headers: {
'Accept': 'application/json',
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': `Basic ${session_token}`,
'Authorization': `Basic ${token}`,
}
};
//Access-Control-Allow-Origin
@@ -72,7 +75,7 @@ class usersService {
};
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
return Axios.post(endPoint, reqData,axiosConfig)
return Axios.post(endPoint, reqData)
.then((response) => {
console.log(response);
// res = response;