Skip to content

Commit

Permalink
Merge branch 'main' into feature/set-minimum-screen-resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-Jay committed Jun 9, 2024
2 parents 4b57871 + d29d245 commit e323d56
Show file tree
Hide file tree
Showing 113 changed files with 2,238 additions and 1,793 deletions.
42 changes: 22 additions & 20 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@ import {
Flex,
HStack,
} from "@chakra-ui/react";
import { Route, Routes } from "react-router-dom";
import Home from "./features/home";
import LoginPage from "./features/login/login-page";
import ProfileSetupPage from "./features/registration/profile-setup-page";
import RegistrationPage from "./features/registration/registration-page";
import OrgProfilePage from "./features/organisation-profile";
import OrganisationList from "./features/organisation-list";
import UserDashboardPage from "./features/user-dashboard/user-dashboard-page";
import { AuthProvider } from "./services/firebase/authProvider";
import FirestoreMock from "./features/firestore-mock/firestore-mock";
import { Paths } from "./paths";
import { appTheme } from "./theme";
import { useGetWindowDimensionsHook } from "./utilities/useGetDdimensionsHook";
import logo from "./assets/images/logo/Mendisphere Logo colour.png";
import Header from "./components/Header";
import Footer from "./components/Footer";
import { AuthProvider } from "./services/firebase/authProvider";
import mendisphereTheme from "./theme/index";
import { Route, Routes } from "react-router-dom";
import { Paths } from "./routing/Paths";
import Home from "./pages/Home";
import Login from "./pages/Login";
import UserDashboard from "./pages/UserDashboard";
import Registration from "./pages/Registration";
import ProfileSetup from "./pages/Registration/ProfileSetup";
import OrganisationList from "./pages/OrganisationList";
import OrganisationProfile from "./pages/OrganisationProfile";
import FirestoreMockPage from "./mocks/FirestoreMock";

function App() {
const { width } = useGetWindowDimensionsHook();

const isNotDesktopWidth = width <= 720;
if (isNotDesktopWidth) {
return (
<ChakraProvider theme={appTheme}>
<ChakraProvider theme={mendisphereTheme}>
<Flex
direction={{ base: "column", md: "row" }}
height={{ base: "auto", md: "15vh", lg: "10vh" }}
Expand Down Expand Up @@ -92,24 +94,24 @@ function App() {
);
}
return (
<ChakraProvider theme={appTheme}>
<ChakraProvider theme={mendisphereTheme}>
<AuthProvider>
<Routes>
<Route path={Paths.home} element={<Home />} />
<Route path={Paths.login} element={<LoginPage />} />
<Route path={Paths.dashboard} element={<UserDashboardPage />} />
<Route path={Paths.signup} element={<RegistrationPage />} />
<Route path={Paths.profileSetup} element={<ProfileSetupPage />} />
<Route path={Paths.login} element={<Login />} />
<Route path={Paths.dashboard} element={<UserDashboard />} />
<Route path={Paths.signup} element={<Registration />} />
<Route path={Paths.profileSetup} element={<ProfileSetup />} />
<Route
path={Paths.organisationListing}
element={<OrganisationList />}
/>
<Route
path={Paths.organisationProfile}
element={<OrgProfilePage />}
element={<OrganisationProfile />}
/>
{process.env.NODE_ENV === "development" && (
<Route path="firestore-mock" element={<FirestoreMock />} />
<Route path="firestore-mock" element={<FirestoreMockPage />} />
)}
</Routes>
</AuthProvider>
Expand Down
4 changes: 2 additions & 2 deletions src/assets/icons/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@ import {
Box,
Text,
} from "@chakra-ui/react";
import { Link as RouterLink } from "react-router-dom";
import { HomeIcon } from "@primer/octicons-react";
import { Organisation } from "../../data/model/organisation";
import { Paths } from "../../paths";
import { Paths } from "../../routing/Paths";

const currentPageStyle = {
color: "#3959FF",
textDecoration: "underline",
fontWeight: "700",
};

const OrgBreadCrumb: React.FC<{ org?: Organisation }> = ({ org }) => {
const Breadcrumbs: React.FC<{ org?: Organisation }> = ({ org }) => {
const isOrgProfilePage = org !== undefined;

return (
<Flex h="6vh">
<Box alignSelf="center" fontSize="14px">
<Flex h="6vh" marginBottom={25}>
<Box
alignSelf="center"
fontSize="14px"
className="page-width page-padding"
>
<Breadcrumb spacing="1vw" separator={<ChevronRightIcon />}>
{/* Home link */}
<BreadcrumbItem>
Expand Down Expand Up @@ -59,4 +62,4 @@ const OrgBreadCrumb: React.FC<{ org?: Organisation }> = ({ org }) => {
);
};

export default OrgBreadCrumb;
export default Breadcrumbs;
1 change: 1 addition & 0 deletions src/components/Breadcrumbs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./Breadcrumbs";
10 changes: 10 additions & 0 deletions src/components/Container/Container.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const Container = (props: any) => {
const { Children } = props;
return (
<Container maxW="1440px" centerContent margin="auto">
{Children}
</Container>
);
};

export default Container;
1 change: 1 addition & 0 deletions src/components/Container/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./Container";
196 changes: 196 additions & 0 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
import {
Flex,
Center,
VStack,
StackDivider,
Divider,
Box,
Text,
HStack,
Spacer,
} from "@chakra-ui/react";
import "../../pages/style.scss";
import { SocialType } from "../../data/enums/social-type.enum";
import { GetIconForSocials } from "../../utilities/iconMappings/iconMapping";
import { Social } from "../../data/model/organisationSummary";

const Footer: React.FC = () => {
const socials: Social[] = [
{
socialType: SocialType.Youtube,
url: "https://www.youtube.com/",
},
{
socialType: SocialType.Facebook,
url: "https://www.facebook.com/",
},
{
socialType: SocialType.LinkedIn,
url: "https://www.linkedin.com/",
},
];
// dynamically generate social icons based on organisation data
const socialIconsView = socials.map((item, index) => {
return (
<Box key={index}>
<a href={item.url}>{GetIconForSocials(item.socialType)}</a>
</Box>
);
});

return (
<Box minH="37.33vh">
<Flex align="left" bg={"#F5F5F5"}>
<Box className="page-width page-padding" minH="37.33vh">
<VStack
divider={<StackDivider borderColor="whiteAlpha.200" />}
spacing={0}
align="stretch"
>
<Box h="4.6vh" />

<Box>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"700"}
fontSize={"32px"}
lineHeight={"39px"}
letterSpacing={"-0.015em"}
color={"#192873"}
>
Mendisphere
</Text>
</Box>

<Box h="2.77vh" />

<HStack align="flex-end">
<Box w="42.2vw" id="footer">
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"400"}
fontSize={"18px"}
lineHeight={"27px"}
letterSpacing={"-0.015em"}
textAlign="justify"
>
Mendisphere aims to bring together mental health organizations
and support non-profit mental health organizations who are
struggling with resources and financial sustainability by
increasing their visibility and supporting their fundraising
efforts. Unlock the potential for mental wellness through
nonprofit-corporate collaboration.
</Text>
</Box>
<Spacer></Spacer>
{socialIconsView}
</HStack>

<Box h="3.77vh"></Box>

<Divider colorScheme={"blue"} orientation={"horizontal"} />

<Box h="2.77vh"></Box>

<Flex>
<Box>
<Flex>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"700"}
fontSize={"24px"}
lineHeight={"29px"}
letterSpacing={"-0.015em"}
color={"#707070"}
as="a"
href="mailto:[email protected]"
>
Contact us at [email protected]
</Text>
<Box w="4.166vw"></Box>

{/* <Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"700"}
fontSize={"24px"}
lineHeight={"29px"}
letterSpacing={"-0.015em"}
>
Get resources
</Text> */}
</Flex>
</Box>
<Box minW="40vw"> </Box>
{/* <Box>
<Flex>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"400"}
fontSize={"18px"}
lineHeight={"22px"}
textAlign={"center"}
letterSpacing={"-0.015em"}
>
About
</Text>
<Box w="4.166vw"></Box>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"400"}
fontSize={"18px"}
lineHeight={"22px"}
textAlign={"center"}
letterSpacing={"-0.015em"}
>
Contact
</Text>
<Box w="4.166vw"></Box>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"400"}
fontSize={"18px"}
lineHeight={"22px"}
textAlign={"center"}
letterSpacing={"-0.015em"}
>
FAQ
</Text>
</Flex>
</Box> */}
</Flex>

<Box h="3.33vh" />

<Box>
<Text
fontFamily={"Inter"}
fontStyle={"normal"}
fontWeight={"400"}
fontSize={"14px"}
lineHeight={"17px"}
letterSpacing={"-0.015em"}
color={"#707070"}
>
{${new Date().getFullYear()} Mendisphere. All Rights Reserved.`}
</Text>
</Box>

<Box h="2vh" />
</VStack>
</Box>
</Flex>
</Box>
);
};

export default Footer;
1 change: 1 addition & 0 deletions src/components/Footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./Footer";
Loading

0 comments on commit e323d56

Please sign in to comment.