Compare commits

...

12 Commits

Author SHA1 Message Date
victorAnumudu 33b1571929 Expires user login session after 5 minutes 2023-02-01 07:18:03 +01:00
tokslaw 1f8a6d0d30 Merge branch 'removing-toasts-ebube' of MyFit/users-myfit into master 2023-01-31 15:48:26 +00:00
Chukwumdiebube 730491dba5 Merge branch 'removing-toasts-ebube' of https://gitlab.chiefsoft.net/MyFit/users-myfit into unwanted-popups-ebube 2023-01-31 16:33:08 +01:00
Chukwumdiebube 4a6c57a777 Toasts removed! 2023-01-31 16:32:41 +01:00
Chukwumdiebube 001540b595 Merge branch 'master' of https://gitlab.chiefsoft.net/MyFit/users-myfit into unwanted-popups-ebube 2023-01-31 14:41:04 +01:00
tokslaw 190ec5eff4 Merge branch 'Ts&Cs-ebube' of MyFit/users-myfit into master 2023-01-31 13:27:37 +00:00
tokslaw c11245d157 Merge branch 'faq-implementation-ebube' of MyFit/users-myfit into master 2023-01-31 13:27:19 +00:00
tokslaw b740b43c37 Merge branch 'user_profile_details' of MyFit/users-myfit into master 2023-01-31 12:42:29 +00:00
Chukwumdiebube 293559c02b Toasts removed! 2023-01-30 23:21:07 +01:00
Chukwumdiebube df3710ec8d faq content updated 2023-01-30 16:19:48 +01:00
Chukwumdiebube 3dfbcdfe48 Updated Texts 2023-01-30 15:58:46 +01:00
Chukwumdiebube d71a810ed2 grammar fixes 2023-01-30 13:50:17 +01:00
10 changed files with 1173 additions and 95 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
},
"[javascriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": null
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"javascript.validate.enable": false, //disable all built-in syntax checking
"editor.codeActionsOnSave": {
+2 -4
View File
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import { toast } from "react-toastify";
// import { toast } from "react-toastify";
import googleLogo from "../../../assets/images/google-logo.svg";
// import titleShape from "../../../assets/images/shape/title-shape.svg";
import titleShape from "../../../assets/images/shape/login_straight_underline.svg";
@@ -49,14 +49,12 @@ export default function Login() {
localStorage.setItem("profile", `${JSON.stringify(loginResult.data.profile)}`);
setLoginLoading(true);
// userApi.getUserReminders(); //testing
setTimeout(() => {
toast.success("Login Successfully");
setTimeout(() => {
navigate("/", { replace: true });
setLoginLoading(false);
dispatch(updateUserInfo(loginResult.data.profile))
}, 2000);
} else {
// toast.error("Invalid Credential");
setLoginError(true)
}
}
+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">
<p className="text-18 tracking-wide text-dark-gray dark:text-white cursor-default">
{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">
<p className="text-base text-thin-light-gray tracking-wide cursor-default">
{datas.content}
</p>
</div>
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -95,7 +95,7 @@ export default function Settings() {
<div className="content-container w-full pt-10 rounded-2xl bg-white dark:bg-dark-white ">
<div className="content-heading w-full mb-8 lg:px-10 px-4">
<h1 className="text-xl font-bold text-dark-gray dark:text-white antialiased">
Parsonal Informaiton
Personal Information
</h1>
</div>
<div className="content-body w-full lg:flex lg:px-10 px-4">
@@ -144,7 +144,7 @@ export default function Settings() {
</div>
<div>
<p className="text-18 tracking-wide">
Notifiction Setting
Notification Settings
</p>
</div>
</li>
+12 -17
View File
@@ -2,38 +2,33 @@
"datas": [
{
"id": 0,
"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"
"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."
},
{
"id": 1,
"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."
"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."
},
{
"id": 2,
"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."
"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."
},
{
"id": 3,
"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."
"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."
},
{
"id": 4,
"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."
"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."
},
{
"id": 5,
"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."
"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."
}
]
}
+22 -1
View File
@@ -1,9 +1,30 @@
import { Navigate, Outlet } from "react-router-dom";
import React, {useEffect} from "react";
import { Navigate, Outlet, useNavigate } from "react-router-dom";
import { toast } from "react-toastify";
const AuthRoute = ({ redirectPath = "/login", children }) => {
const isLogin = localStorage.getItem("email");
const profile = localStorage.getItem("profile")
const navigate = useNavigate();
//FUNCTION TO EXPIRE SESSION AFETR 5 MINUTES
const expireSession = () => {
localStorage.removeItem("email");
localStorage.removeItem('session_token');
localStorage.removeItem('profile');
// navigate("/login", { replace: true });
};
useEffect(()=>{
setTimeout(()=>{
expireSession()
toast.success("Opps, session has expired", {
icon: `🙂`,
});
}, 300000) //expires user login session after 5 minutes
},[])
if (!isLogin || !profile || (typeof JSON.parse(profile) == 'object' && JSON.parse(profile).firstname == undefined)) {
return <Navigate to={redirectPath} replace />;
}
+1 -1
View File
@@ -1,7 +1,7 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
userInfo: JSON.parse(localStorage.getItem("profile"))
userInfo: localStorage.getItem('profile') && JSON.parse(localStorage.getItem("profile"))
};
export const userSlice = createSlice({
+1 -19
View File
@@ -1,29 +1,11 @@
import React, {useEffect} from "react";
import Home from "../components/Home";
import { useNavigate } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import { toast } from "react-toastify";
// import { toast } from "react-toastify";
export default function HomePages() {
const { drawer } = useSelector((state) => state.drawer);
const dispatch = useDispatch();
const navigate = useNavigate();
const logOut = () => {
localStorage.removeItem("email");
localStorage.removeItem('session_token');
toast.success("Come Back Soon", {
icon: `🙂`,
});
navigate("/login", { replace: true });
};
useEffect(()=>{
setTimeout(()=>{
logOut()
}, 300000) //expires user login session after 5 minutes
},[])
return (
<>
<Home />
+3
View File
@@ -19,6 +19,9 @@ module.exports = {
"dark-light-purple":"#5356fb29"
},
},
listStyleType: {
roman: 'upper-roman'
},
},
plugins: [require("@tailwindcss/line-clamp")],
};