Skip to content

Commit 88e4753

Browse files
committed
Rewirings
1 parent f1e41b0 commit 88e4753

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+5389
-5108
lines changed

public/index.html

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/logo.svg" />
6-
<meta
7-
name="viewport"
8-
content="width=device-width, initial-scale=1 maximum-scale= 1.0"
9-
/>
10-
<meta name="theme-color" content="#f3fbf4" />
11-
<!-- <meta
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/logo.svg" />
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1 maximum-scale= 1.0"
9+
/>
10+
<meta name="theme-color" content="#fefefe" />
11+
<!-- <meta
1212
name="description"
1313
content="Web site created using create-react-app"
1414
/> -->
15-
<meta property="og:title" content="Tranquil" />
16-
<meta property="og:image" content="%PUBLIC_URL%/Image.png" />
17-
<!-- <meta property="og:url" content="" /> -->
18-
<meta property="og:type" content="website" />
19-
<meta
20-
property="og:description"
21-
content="A web app aimed at providing support and resources to individuals experiencing mental health challenges."
22-
/>
23-
<meta property="og:locale" content="en_GB" />
15+
<meta property="og:title" content="Tranquil" />
16+
<meta property="og:image" content="%PUBLIC_URL%/Image.png" />
17+
<!-- <meta property="og:url" content="" /> -->
18+
<meta property="og:type" content="website" />
19+
<meta
20+
property="og:description"
21+
content="A web app aimed at providing support and resources to individuals experiencing mental health challenges."
22+
/>
23+
<meta property="og:locale" content="en_GB" />
2424

25-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" />
26-
<!--
25+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" />
26+
<!--
2727
manifest.json provides metadata used when your web app is installed on a
2828
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
2929
-->
30-
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
31-
<!--
30+
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
31+
<!--
3232
Notice the use of %PUBLIC_URL% in the tags above.
3333
It will be replaced with the URL of the `public` folder during the build.
3434
Only files inside the `public` folder can be referenced from the HTML.
@@ -37,12 +37,12 @@
3737
work correctly both with client-side routing and a non-root public URL.
3838
Learn how to configure a non-root public URL by running `npm run build`.
3939
-->
40-
<title>Tranquil</title>
41-
</head>
42-
<body>
43-
<noscript>You need to enable JavaScript to run this app.</noscript>
44-
<div id="root"></div>
45-
<!--
40+
<title>Tranquil</title>
41+
</head>
42+
<body>
43+
<noscript>You need to enable JavaScript to run this app.</noscript>
44+
<div id="root"></div>
45+
<!--
4646
This HTML file is a template.
4747
If you open it directly in the browser, you will see an empty page.
4848
@@ -52,5 +52,5 @@
5252
To begin the development, run `npm start` or `yarn start`.
5353
To create a production bundle, use `npm run build` or `yarn build`.
5454
-->
55-
</body>
55+
</body>
5656
</html>

src/App.css

+45-41
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,81 @@
11
@import url("https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@300&family=Epilogue:wght@300&family=Lato:wght@300;400;700&family=Montserrat:wght@100;400&family=Poppins:wght@200&family=The+Nautigal:wght@700&family=Ubuntu+Mono&display=swap");
22

33
* {
4-
padding: 0;
5-
margin: 0;
6-
box-sizing: border-box;
4+
padding: 0;
5+
margin: 0;
6+
box-sizing: border-box;
7+
}
8+
body::-webkit-scrollbar {
9+
width: 0px;
10+
height: 0px;
711
}
812
input[type="password"]::-ms-reveal {
9-
display: none;
13+
display: none;
1014
}
1115

1216
.Opening {
13-
background: linear-gradient(#182625, #dae9da);
14-
height: 100vh;
17+
background: linear-gradient(#182625, #dae9da);
18+
height: 100vh;
1519
}
1620

1721
.Opening header {
18-
background-image: url(./Assets/home.svg);
19-
background-repeat: no-repeat;
20-
background-size: cover;
21-
background-color: transparent;
22-
background-position: center;
23-
height: 100%;
24-
display: flex;
25-
align-items: center;
26-
justify-content: center;
22+
background-image: url(./Assets/home.svg);
23+
background-repeat: no-repeat;
24+
background-size: cover;
25+
background-color: transparent;
26+
background-position: center;
27+
height: 100%;
28+
display: flex;
29+
align-items: center;
30+
justify-content: center;
2731
}
2832

2933
.Opening .imgText {
30-
display: flex;
31-
flex-direction: column;
32-
align-items: center;
33-
justify-content: center;
34+
display: flex;
35+
flex-direction: column;
36+
align-items: center;
37+
justify-content: center;
3438
}
3539

3640
.logo img {
37-
height: 60px;
41+
height: 60px;
3842
}
3943

4044
.imgText p {
41-
font-family: "Lato";
42-
text-align: center;
43-
color: #d7b31b;
44-
font-weight: 300;
45+
font-family: "Lato";
46+
text-align: center;
47+
color: #d7b31b;
48+
font-weight: 300;
4549
}
4650

4751
.imgText .firstText {
48-
animation: textOpacityChangeForOpeningPage1 2s;
52+
animation: textOpacityChangeForOpeningPage1 2s;
4953
}
5054

5155
.imgText .secondText {
52-
animation: textOpacityChangeForOpeningPage2 2s;
56+
animation: textOpacityChangeForOpeningPage2 2s;
5357
}
5458

5559
@keyframes textOpacityChangeForOpeningPage1 {
56-
0% {
57-
opacity: 0;
58-
}
60+
0% {
61+
opacity: 0;
62+
}
5963

60-
80% {
61-
opacity: 1;
62-
}
64+
80% {
65+
opacity: 1;
66+
}
6367

64-
100% {
65-
opacity: 0;
66-
}
68+
100% {
69+
opacity: 0;
70+
}
6771
}
6872

6973
@keyframes textOpacityChangeForOpeningPage2 {
70-
0% {
71-
opacity: 0;
72-
}
74+
0% {
75+
opacity: 0;
76+
}
7377

74-
100% {
75-
opacity: 1;
76-
}
78+
100% {
79+
opacity: 1;
80+
}
7781
}

src/App.js

+78-66
Original file line numberDiff line numberDiff line change
@@ -5,83 +5,95 @@ import { useEffect, useState } from "react";
55
//React Hook used for defining routes to pages
66
import { Routes, Route, useNavigate } from "react-router";
77
//context
8-
import { FormProvider } from "./Components/FormContext";
8+
import { FormProvider } from "./Components/Globals/FormContext";
99
//logo import
1010
import tranquilLogo from "./Assets/home_logo.svg";
1111
//importing pages/components
12-
import Login from "./Components/Login Page/Login";
13-
import Slides from "./Components/SignUp Page/Slides/Slides";
14-
import SignUp from "./Components/SignUp Page/SignUp";
15-
import Otp from "./Components/SignUp Page/OTP/Otp";
16-
import SignIn from "./Components/Login Page/SignIn/SignIn";
17-
import Forgot from "./Components/ForgotPassword/Forgot";
18-
import Redirector from "./Components/redirector";
19-
import Tranquil from "./Components/Tranquil App/Tranquil";
20-
import Profile from "./Components/Tranquil App/Profile/Profile";
12+
import Login from "./Components/Forms/Login/Login";
13+
import SignIn from "./Components/Forms/SignIn/SignIn";
14+
import SignUp from "./Components/Forms/SignUp/SignUp";
15+
import Slides from "./Components/Forms/Slides/Slides";
16+
import Prompts from "./Components/Forms/NewUserPrompt/Prompt";
17+
import Redirector from "./Components/Forms/Redirect/Redirector";
18+
import Otp from "./Components/Forms/OTP/Otp";
19+
import Forgot from "./Components/Forms/ForgotPassword/Forgot";
20+
import Tranquil from "./Components/Tranquil App/Tranquil/Tranquil";
21+
import Profile from "./Components/Tranquil App/Profile/Profile/Profile";
2122
import EditProfile from "./Components/Tranquil App/Profile/Profile_Update/UpdateProfile";
22-
import Intro from "./Components/Introduction/Intro";
23-
23+
import { PageProvider } from "./Components/Tranquil App/Tranquil/PageContext";
2424
function App() {
25-
var navigate = useNavigate();
26-
var [openingCompleted, setCompletionState] = useState(false);
27-
var [firstTextDisplay, setNewTextDisplay] = useState(true);
28-
function Opening() {
29-
useEffect(() => {
30-
const firstTextTimer = setTimeout(() => {
31-
setNewTextDisplay(false);
32-
}, 2000);
25+
var navigate = useNavigate();
26+
var [openingCompleted, setCompletionState] = useState(false);
27+
var [firstTextDisplay, setNewTextDisplay] = useState(true);
28+
function Opening() {
29+
useEffect(() => {
30+
const firstTextTimer = setTimeout(() => {
31+
setNewTextDisplay(false);
32+
}, 2000);
3333

34-
const introTimer = setTimeout(() => {
35-
setCompletionState(true);
36-
}, 2100);
34+
const introTimer = setTimeout(() => {
35+
setCompletionState(true);
36+
}, 2100);
3737

38-
return () => {
39-
clearTimeout(firstTextTimer);
40-
clearTimeout(introTimer);
41-
};
42-
}, []);
43-
useEffect(() => {
44-
openingCompleted === true && navigate("/login");
45-
});
38+
return () => {
39+
clearTimeout(firstTextTimer);
40+
clearTimeout(introTimer);
41+
};
42+
}, []);
43+
useEffect(() => {
44+
openingCompleted === true && navigate("/login");
45+
});
4646

47-
return (
48-
<div className="Opening">
49-
<header>
50-
<div className="imgText">
51-
<div className="logo">
52-
<img src={tranquilLogo} alt="" />
47+
return (
48+
<div className="Opening">
49+
<header>
50+
<div className="imgText">
51+
<div className="logo">
52+
<img src={tranquilLogo} alt="" />
53+
</div>
54+
55+
{firstTextDisplay ? (
56+
<p className="firstText">
57+
Unleash the Power within
58+
</p>
59+
) : (
60+
<p className="secondText">
61+
Find your inner Balance
62+
</p>
63+
)}
64+
</div>
65+
</header>
5366
</div>
67+
);
68+
}
5469

55-
{firstTextDisplay ? (
56-
<p className="firstText">Unleash the Power within</p>
57-
) : (
58-
<p className="secondText">Find your inner Balance</p>
59-
)}
60-
</div>
61-
</header>
62-
</div>
70+
return (
71+
<FormProvider>
72+
<PageProvider>
73+
<Routes>
74+
<Route index element={<Opening />} />
75+
<Route path="/login" element={<Login />} />
76+
<Route path="/signIn" element={<SignIn />} />
77+
<Route path="/signUp" element={<SignUp />} />
78+
<Route path="/getStarted" element={<Slides />} />
79+
<Route path="/newUser" element={<Prompts />} />
80+
<Route
81+
path="/redirectPage/:token"
82+
element={<Redirector />}
83+
/>
84+
<Route path="/otp" element={<Otp />} />
85+
<Route path="/forgotPassword" element={<Forgot />} />
86+
<Route path="/tranquil/*" element={<Tranquil />} />
87+
<Route path="/tranquil/profile/" element={<Profile />} />
88+
<Route
89+
path="/tranquil/profile/editProfile"
90+
element={<EditProfile />}
91+
/>
92+
</Routes>
93+
</PageProvider>
94+
</FormProvider>
95+
//These are the routes to various pages of the app
6396
);
64-
}
65-
66-
return (
67-
<FormProvider>
68-
<Routes>
69-
<Route index element={<Opening />} />
70-
<Route path="/login" element={<Login />} />
71-
<Route path="/signIn" element={<SignIn />} />
72-
<Route path="/signIn/forgotPassword" element={<Forgot />} />
73-
<Route path="/signUp" element={<SignUp />} />
74-
<Route path="/getStarted" element={<Slides />} />
75-
<Route path="/otp" element={<Otp />} />
76-
<Route path="/redirectPage/:token" element={<Redirector />} />
77-
<Route path="/tranquil/*" element={<Tranquil />} />
78-
<Route path="/tranquil/profile/" element={<Profile />} />
79-
<Route path="/tranquil/profile/editProfile" element={<EditProfile />} />
80-
<Route path="/intro" element={<Intro />} />
81-
</Routes>
82-
</FormProvider>
83-
//These are the routes to various pages of the app
84-
);
8597
}
8698

8799
export default App;

0 commit comments

Comments
 (0)