diff --git a/.github/workflows/update-dev.yaml b/.github/workflows/update-dev.yaml index a1a77b8f..c4d2ab90 100644 --- a/.github/workflows/update-dev.yaml +++ b/.github/workflows/update-dev.yaml @@ -1,21 +1,21 @@ -name: Update Dev Branch on Main Update - -on: - push: - branches: - - main - -jobs: - update-dev-branch: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Update Dev branch - run: | - git checkout -B dev main # Checkout or create 'dev' branch from 'main' - git pull origin main # Pull changes from the main branch - # Make necessary changes here or use any other command to update the dev branch - git push origin dev # Push changes to the 'dev' branch +name: Update Dev Branch on Main Update + +on: + push: + branches: + - main + +jobs: + update-dev-branch: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Update Dev branch + run: | + git checkout -B dev main # Checkout or create 'dev' branch from 'main' + git pull origin main # Pull changes from the main branch + # Make necessary changes here or use any other command to update the dev branch + git push origin dev # Push changes to the 'dev' branch diff --git a/package.json b/package.json index cc4312ea..0751d434 100644 --- a/package.json +++ b/package.json @@ -1,65 +1,65 @@ -{ - "name": "syt_website", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "vite build", - "lint": "eslint --fix eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview", - "prepare": "husky install", - "start": "react-scripts start", - "test": "react-scripts test", - "eject": "react-scripts eject", - "pretty": "prettier --write ." - }, - "dependencies": { - "@emailjs/browser": "^3.11.0", - "@fortawesome/fontawesome-svg-core": "^6.4.0", - "@fortawesome/free-solid-svg-icons": "^6.4.0", - "@fortawesome/react-fontawesome": "^0.2.0", - "@headlessui/react": "^1.7.15", - "@hookform/resolvers": "^3.3.2", - "@tanstack/react-query": "^4.35.3", - "@tanstack/react-query-devtools": "^4.35.3", - "axios": "^1.6.1", - "date-fns": "^2.30.0", - "html-react-parser": "^5.0.6", - "prop-types": "^15.8.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-hook-form": "^7.48.2", - "react-query": "^3.39.3", - "react-router-dom": "^6.11.2", - "react-simple-wysiwyg": "^2.2.5", - "tailwind-scrollbar-hide": "^1.1.7", - "yup": "^1.3.2" - }, - "devDependencies": { - "@types/react": "^18.0.28", - "@types/react-dom": "^18.0.11", - "@vitejs/plugin-react": "^4.0.0", - "autoprefixer": "^10.4.14", - "eslint": "^8.43.0", - "eslint-config-airbnb": "^19.0.4", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.32.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.3.4", - "husky": "^8.0.0", - "lint-staged": "^13.2.2", - "postcss": "^8.4.23", - "prettier": "^2.8.8", - "tailwindcss": "^3.3.2", - "vite": "^4.3.2" - }, - "lint-staged": { - "**/*.{js,jsx}": [ - "npm run lint", - "prettier --write" - ] - } -} +{ + "name": "syt_website", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint": "eslint --fix eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview", + "prepare": "husky install", + "start": "react-scripts start", + "test": "react-scripts test", + "eject": "react-scripts eject", + "pretty": "prettier --write ." + }, + "dependencies": { + "@emailjs/browser": "^3.11.0", + "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@fortawesome/react-fontawesome": "^0.2.0", + "@headlessui/react": "^1.7.15", + "@hookform/resolvers": "^3.3.2", + "@tanstack/react-query": "^4.35.3", + "@tanstack/react-query-devtools": "^4.35.3", + "axios": "^1.6.1", + "date-fns": "^2.30.0", + "html-react-parser": "^5.0.6", + "prop-types": "^15.8.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-hook-form": "^7.48.2", + "react-query": "^3.39.3", + "react-router-dom": "^6.11.2", + "react-simple-wysiwyg": "^2.2.5", + "tailwind-scrollbar-hide": "^1.1.7", + "yup": "^1.3.2" + }, + "devDependencies": { + "@types/react": "^18.0.28", + "@types/react-dom": "^18.0.11", + "@vitejs/plugin-react": "^4.0.0", + "autoprefixer": "^10.4.14", + "eslint": "^8.43.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-jsx-a11y": "^6.7.1", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.3.4", + "husky": "^8.0.0", + "lint-staged": "^13.2.2", + "postcss": "^8.4.23", + "prettier": "^2.8.8", + "tailwindcss": "^3.3.2", + "vite": "^4.3.2" + }, + "lint-staged": { + "**/*.{js,jsx}": [ + "npm run lint", + "prettier --write" + ] + } +} diff --git a/src/ADMIN/pages/events/AddEventPage.jsx b/src/ADMIN/pages/events/AddEventPage.jsx index 1716b191..d3da1736 100644 --- a/src/ADMIN/pages/events/AddEventPage.jsx +++ b/src/ADMIN/pages/events/AddEventPage.jsx @@ -1,409 +1,408 @@ -import React, { useEffect, useState } from "react"; -import { useQuery } from "react-query"; -import { BtnBold, BtnBulletList, BtnClearFormatting, BtnItalic, BtnLink, BtnNumberedList, BtnRedo, BtnStrikeThrough, BtnStyles, BtnUnderline, BtnUndo, Editor, EditorProvider, Toolbar } from "react-simple-wysiwyg"; -import { Controller, useForm } from "react-hook-form"; -import * as yup from "yup"; -import { yupResolver } from "@hookform/resolvers/yup"; - -import { useEventsCategories } from "../../../hooks/Queries/eventsSection/useEventCategories"; -import useChaptersData from "../../../hooks/Queries/community/useChaptersData"; -import usePostEvents from "../../../hooks/Queries/eventsSection/usePostEvents"; -import "../../../APP/pages/community/sections/eventsSection/SingleEvents/EventAbout.css" - -function AddEventPage() { - const [ selectedEventCategory, setSelectedEventCategory ] = useState('1'); - const [ editorState, setEditorState ] = useState(''); - const [ poster, setPoster ] = useState(''); - const [ newCategory, setNewCategory ] = useState(false); - - const { data: eventsCategories, status: statusEventsCategories } = useEventsCategories(); - const { data: chaptersData, isLoading, isError, isSuccess } = useChaptersData(); - const { - setEventData: postEvent, - error: errorPostEvent, - clearError: clearErrorPostEvent, - status: statusPostEvent, - clearStatus: clearStatusPostEvent - } = usePostEvents(); - - const handleEventAboutChange = (e) => { - setEditorState(e.target.value); - setValue("about", e.target.value); - clearErrors("about"); - } - - const handleUploadImageClick = (e, id) => { - if ((e.type === "keydown" && e.key === "Enter") || (e.type === "click")) - document.getElementById(id).click() - } - - const validationSchema = yup.object().shape({ - name: yup.string().required("Event name is required."), - about: yup.string().required("Event about details are reqired."), - link: yup.string().url("Enter a valid url.").required("Event link is required."), - location: yup.string().required("Event location (Building, region, etc) is required."), - mode: yup.string().required("Event mode is required."), - city: yup.string().required("Event city is required."), - country: yup.string().required("Event country is required."), - date: yup.string().required("Event date is required"), - start_time: yup.string().required("Event starting time is required."), - end_time: yup.string().required("Event ending time is required."), - poster: yup.mixed().required("Event poster is required."), - category: yup.string().when("$newCategory", { - is: false, - then: (schema) => schema.required("Event category is required."), - otherwise: (schema) => schema - }), - category_name: yup.string().when("$newCategory", { - is: true, - then: (schema) => schema.required("Enter a new category name."), - otherwise: (schema) => schema - }), - chapter: yup.string().required("Associated chapter is required.") - }); - - const { - register, - control, - handleSubmit, - setValue, - formState: { errors }, - clearErrors, - trigger, - reset - } = useForm({ - defaultValues: { - "category": 1, - "chapter": 1, - "mode": "Physical" - }, - mode: "onChange", - resolver: yupResolver(validationSchema), - context: { newCategory } - }); - - const onSubmit = (data) => { - data.poster = poster; - - postEvent({...data}); - } - - useEffect(() => { - (selectedEventCategory === "") ? setNewCategory(true) : setNewCategory(false) - }, [selectedEventCategory]); - - useEffect(() => { trigger(); },[trigger, newCategory]); - - useEffect(() => { - if (statusPostEvent === "success") { - postEvent(null); - reset(); - setEditorState(''); - setPoster(''); - } - }, [statusPostEvent]) - - return ( -
-
-

Events

-

Create Event

-

Add new event details

-
- {/* Success Display */} - {statusPostEvent==="success" && -
- Event Added Successfully! - { - clearStatusPostEvent(); - postEvent(null); - }} > - Close - -
- } - {/* Errors Display */} - {statusPostEvent === "error" && errorPostEvent?.axios && -
- Cannot add the event: - {errorPostEvent.axios} - { - clearErrorPostEvent(); - clearStatusPostEvent(); - }} > - Close - -
- } - {statusPostEvent==="error" && errorPostEvent?.event && -
- Cannot add the event: - - { - clearErrorPostEvent(); - clearStatusPostEvent(); - }} > - Close - -
- } - - - {isError &&

Error loading chapters. Cannot add an event without a chapters. Contact the site admin!

} - {isSuccess && - <> - {chaptersData && Array.isArray(chaptersData) ? ( - <> - {chaptersData.length >= 1 ? ( -
-
- - {errors.name && {errors.name.message}} -
- - { statusEventsCategories === "error" && -
- - {errors.category_name && {errors.category_name.message}} -
- } - { statusEventsCategories === "success" && -
- - {errors.category && {errors.category.message}} -
- } - - {selectedEventCategory === "" && newCategory && - - } - {errors.category_name && {errors.category_name.message}} -
- - ( - - - - - - - - - - - - - - - - )} /> - - {errors.about && {errors.about.message}} -
-
- - {errors.chapter && {errors.chapter.message}} -
-
- - {errors.mode && {errors.mode.message}} -
-
- - {errors.location && {errors.location.message}} -
-
- - {errors.city && {errors.city.message}} -
-
- - {errors.country && {errors.country.message}} -
-
- - {errors.link && {errors.link.message}} -
-
- Date - - {errors.date && {errors.date.message}} -
-
-
- Start Time - - {errors.start_time && {errors.start_time.message}} -
-
- End Time - - {errors.end_time && {errors.end_time.message}} -
-
-
handleUploadImageClick(e,'poster')} - onKeyDown={(e)=>handleUploadImageClick(e,'poster')} - tabIndex="0" - role="button" - > - ( - <> - { - field.onChange(e); - setPoster(e.target.files[0]); - }} - style={{ display: "none" }} - /> -
-
-
- Upload Event Poster -
-
- {poster ? ( -
-

{poster.name}

-
- ) : ( -
-
- PNG, JPG, JFIF -
-
- )} -
- - )} /> -
- {errors.poster && {errors.poster.message}} -
- - Cancel - - -
-
- ) : ( -

You need to first add a chapter before adding an event!

- )} - - ) : ('')} - - } -
- ); -} - -export default AddEventPage; +import React, { useEffect, useState } from "react"; +import { useQuery } from "react-query"; +import { BtnBold, BtnBulletList, BtnClearFormatting, BtnItalic, BtnLink, BtnNumberedList, BtnRedo, BtnStrikeThrough, BtnStyles, BtnUnderline, BtnUndo, Editor, EditorProvider, Toolbar } from "react-simple-wysiwyg"; +import { Controller, useForm } from "react-hook-form"; +import * as yup from "yup"; +import { yupResolver } from "@hookform/resolvers/yup"; + +import { useEventsCategories } from "../../../hooks/Queries/eventsSection/useEventCategories"; +import useChaptersData from "../../../hooks/Queries/community/useChaptersData"; +import usePostEvents from "../../../hooks/Queries/eventsSection/usePostEvents"; + +function AddEventPage() { + const [ selectedEventCategory, setSelectedEventCategory ] = useState('1'); + const [ editorState, setEditorState ] = useState(''); + const [ poster, setPoster ] = useState(''); + const [ newCategory, setNewCategory ] = useState(false); + + const { data: eventsCategories, status: statusEventsCategories } = useEventsCategories(); + const { data: chaptersData, isLoading, isError, isSuccess } = useChaptersData(); + const { + setEventData: postEvent, + error: errorPostEvent, + clearError: clearErrorPostEvent, + status: statusPostEvent, + clearStatus: clearStatusPostEvent + } = usePostEvents(); + + const handleEventAboutChange = (e) => { + setEditorState(e.target.value); + setValue("about", e.target.value); + clearErrors("about"); + } + + const handleUploadImageClick = (e, id) => { + if ((e.type === "keydown" && e.key === "Enter") || (e.type === "click")) + document.getElementById(id).click() + } + + const validationSchema = yup.object().shape({ + name: yup.string().required("Event name is required."), + about: yup.string().required("Event about details are reqired."), + link: yup.string().url("Enter a valid url.").required("Event link is required."), + location: yup.string().required("Event location (Building, region, etc) is required."), + mode: yup.string().required("Event mode is required."), + city: yup.string().required("Event city is required."), + country: yup.string().required("Event country is required."), + date: yup.string().required("Event date is required"), + start_time: yup.string().required("Event starting time is required."), + end_time: yup.string().required("Event ending time is required."), + poster: yup.mixed().required("Event poster is required."), + category: yup.string().when("$newCategory", { + is: false, + then: (schema) => schema.required("Event category is required."), + otherwise: (schema) => schema + }), + category_name: yup.string().when("$newCategory", { + is: true, + then: (schema) => schema.required("Enter a new category name."), + otherwise: (schema) => schema + }), + chapter: yup.string().required("Associated chapter is required.") + }); + + const { + register, + control, + handleSubmit, + setValue, + formState: { errors }, + clearErrors, + trigger, + reset + } = useForm({ + defaultValues: { + "category": 1, + "chapter": 1, + "mode": "Physical" + }, + mode: "onChange", + resolver: yupResolver(validationSchema), + context: { newCategory } + }); + + const onSubmit = (data) => { + data.poster = poster; + + postEvent({...data}); + } + + useEffect(() => { + (selectedEventCategory === "") ? setNewCategory(true) : setNewCategory(false) + }, [selectedEventCategory]); + + useEffect(() => { trigger(); },[trigger, newCategory]); + + useEffect(() => { + if (statusPostEvent === "success") { + postEvent(null); + reset(); + setEditorState(''); + setPoster(''); + } + }, [statusPostEvent]) + + return ( +
+
+

Events

+

Create Event

+

Add new event details

+
+ {/* Success Display */} + {statusPostEvent==="success" && +
+ Event Added Successfully! + { + clearStatusPostEvent(); + postEvent(null); + }} > + Close + +
+ } + {/* Errors Display */} + {statusPostEvent === "error" && errorPostEvent?.axios && +
+ Cannot add the event: + {errorPostEvent.axios} + { + clearErrorPostEvent(); + clearStatusPostEvent(); + }} > + Close + +
+ } + {statusPostEvent==="error" && errorPostEvent?.event && +
+ Cannot add the event: + + { + clearErrorPostEvent(); + clearStatusPostEvent(); + }} > + Close + +
+ } + + + {isError &&

Error loading chapters. Cannot add an event without a chapters. Contact the site admin!

} + {isSuccess && + <> + {chaptersData && Array.isArray(chaptersData) ? ( + <> + {chaptersData.length >= 1 ? ( +
+
+ + {errors.name && {errors.name.message}} +
+ + { statusEventsCategories === "error" && +
+ + {errors.category_name && {errors.category_name.message}} +
+ } + { statusEventsCategories === "success" && +
+ + {errors.category && {errors.category.message}} +
+ } + + {selectedEventCategory === "" && newCategory && + + } + {errors.category_name && {errors.category_name.message}} +
+ + ( + + + + + + + + + + + + + + + + )} /> + + {errors.about && {errors.about.message}} +
+
+ + {errors.chapter && {errors.chapter.message}} +
+
+ + {errors.mode && {errors.mode.message}} +
+
+ + {errors.location && {errors.location.message}} +
+
+ + {errors.city && {errors.city.message}} +
+
+ + {errors.country && {errors.country.message}} +
+
+ + {errors.link && {errors.link.message}} +
+
+ Date + + {errors.date && {errors.date.message}} +
+
+
+ Start Time + + {errors.start_time && {errors.start_time.message}} +
+
+ End Time + + {errors.end_time && {errors.end_time.message}} +
+
+
handleUploadImageClick(e,'poster')} + onKeyDown={(e)=>handleUploadImageClick(e,'poster')} + tabIndex="0" + role="button" + > + ( + <> + { + field.onChange(e); + setPoster(e.target.files[0]); + }} + style={{ display: "none" }} + /> +
+
+
+ Upload Event Poster +
+
+ {poster ? ( +
+

{poster.name}

+
+ ) : ( +
+
+ PNG, JPG, JFIF +
+
+ )} +
+ + )} /> +
+ {errors.poster && {errors.poster.message}} +
+ + Cancel + + +
+
+ ) : ( +

You need to first add a chapter before adding an event!

+ )} + + ) : ('')} + + } +
+ ); +} + +export default AddEventPage; diff --git a/src/APP/components/Footer.jsx b/src/APP/components/Footer.jsx index 7f8cb73e..cb829ac2 100644 --- a/src/APP/components/Footer.jsx +++ b/src/APP/components/Footer.jsx @@ -1,199 +1,199 @@ -import { - facebook, - instagram, - linkedin, - twitter, -} from "../../assets/images/socials"; -import logo from "../../assets/images/sytLogo.png"; - -function Footer() { - var now = new Date(); - var year = now.getFullYear(); - return ( - - ); -} - -export default Footer; +import { + facebook, + instagram, + linkedin, + twitter, +} from "../../assets/images/socials"; +import logo from "../../assets/images/sytLogo.png"; + +function Footer() { + var now = new Date(); + var year = now.getFullYear(); + return ( + + ); +} + +export default Footer; diff --git a/src/APP/components/Footer2.jsx b/src/APP/components/Footer2.jsx index 6a256911..5db5f3cf 100644 --- a/src/APP/components/Footer2.jsx +++ b/src/APP/components/Footer2.jsx @@ -1,155 +1,155 @@ -import React from "react"; -import { Link } from "react-router-dom"; -import logo from "../../assets/images/sytLogo.png"; -import backup from "../../assets/images/backup.svg"; -import { linkedin, twitter, spotify } from "../../assets/images/socials"; -import youtube from "../../assets/images/socials/youtube.svg"; - -function Footer2() { - const now = new Date(); - const year = now.getFullYear(); - - return ( - - ); -} - -export default Footer2; +import React from "react"; +import { Link } from "react-router-dom"; +import logo from "../../assets/images/sytLogo.png"; +import backup from "../../assets/images/backup.svg"; +import { linkedin, twitter, spotify } from "../../assets/images/socials"; +import youtube from "../../assets/images/socials/youtube.svg"; + +function Footer2() { + const now = new Date(); + const year = now.getFullYear(); + + return ( + + ); +} + +export default Footer2; diff --git a/src/APP/components/Header.jsx b/src/APP/components/Header.jsx index 4f78542b..b9cd7edc 100644 --- a/src/APP/components/Header.jsx +++ b/src/APP/components/Header.jsx @@ -1,25 +1,25 @@ -import logo from "../../assets/images/sytLogo.png"; - -function Header() { - return ( -
-
- - Logo - - -
-
- ); -} - -export default Header; +import logo from "../../assets/images/sytLogo.png"; + +function Header() { + return ( +
+
+ + Logo + + +
+
+ ); +} + +export default Header; diff --git a/src/APP/components/Header2.jsx b/src/APP/components/Header2.jsx index be4e7883..77c48769 100644 --- a/src/APP/components/Header2.jsx +++ b/src/APP/components/Header2.jsx @@ -1,162 +1,162 @@ -import logo from "../../assets/images/sytLogo.png"; -import { useState } from "react"; - -import menu from "../../assets/images/hamburger-menu.svg"; -import { Link } from "react-router-dom"; - -const Header2 = () => { - const [showNavlinks, setShowNavlinks] = useState(false); - - return ( -
- {/* logo */} - - logo - - - {/* mobile menu */} - logo setShowNavlinks((prev) => !prev)} - /> - - {/* mobile navlinks */} - - - {/* navlinks */} - -
- ); -}; - -export default Header2; +import logo from "../../assets/images/sytLogo.png"; +import { useState } from "react"; + +import menu from "../../assets/images/hamburger-menu.svg"; +import { Link } from "react-router-dom"; + +const Header2 = () => { + const [showNavlinks, setShowNavlinks] = useState(false); + + return ( +
+ {/* logo */} + + logo + + + {/* mobile menu */} + logo setShowNavlinks((prev) => !prev)} + /> + + {/* mobile navlinks */} + + + {/* navlinks */} + +
+ ); +}; + +export default Header2; diff --git a/src/APP/components/PodcastCard.jsx b/src/APP/components/PodcastCard.jsx index c7a6238f..20397857 100644 --- a/src/APP/components/PodcastCard.jsx +++ b/src/APP/components/PodcastCard.jsx @@ -1,31 +1,31 @@ -import React from "react"; -import PropTypes from "prop-types"; - -function PodcastCard({ img, category = "Podcast", title, description, link }) { - return ( - -
- podcast -
- -
-
- {category} -
-

{title}

-

{description}

-
-
-
- ); -} - -export default PodcastCard; - -PodcastCard.propTypes = { - img: PropTypes.string.isRequired, - category: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, - description: PropTypes.string.isRequired, - link: PropTypes.number.isRequired, -}; +import React from "react"; +import PropTypes from "prop-types"; + +function PodcastCard({ img, category = "Podcast", title, description, link }) { + return ( + +
+ podcast +
+ +
+
+ {category} +
+

{title}

+

{description}

+
+
+
+ ); +} + +export default PodcastCard; + +PodcastCard.propTypes = { + img: PropTypes.string.isRequired, + category: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + description: PropTypes.string.isRequired, + link: PropTypes.number.isRequired, +}; diff --git a/src/APP/components/index.js b/src/APP/components/index.js index 38943c20..d0b42783 100644 --- a/src/APP/components/index.js +++ b/src/APP/components/index.js @@ -1,10 +1,10 @@ -import { default as FAQ } from "./FAQ"; -import { default as Footer } from "./Footer"; -import { default as Footer2 } from "./Footer2"; -import { default as Header } from "./Header"; -import { default as Header2 } from "./Header2"; -import { default as Caroussel } from "./Caroussel"; -import { default as Counter } from "./Counter"; -import { default as PodcastCard } from "./PodcastCard"; - +import { default as FAQ } from "./FAQ"; +import { default as Footer } from "./Footer"; +import { default as Footer2 } from "./Footer2"; +import { default as Header } from "./Header"; +import { default as Header2 } from "./Header2"; +import { default as Caroussel } from "./Caroussel"; +import { default as Counter } from "./Counter"; +import { default as PodcastCard } from "./PodcastCard"; + export { FAQ, Footer, Footer2, Header, Header2, Caroussel, Counter, PodcastCard}; \ No newline at end of file diff --git a/src/APP/index.js b/src/APP/index.js index 11b4a79a..fe748283 100644 --- a/src/APP/index.js +++ b/src/APP/index.js @@ -1,39 +1,39 @@ -import { default as LandingPage } from "../APP/pages/landingPage/LandingPage"; -import { default as Homepage } from "../APP/pages/shop/pages/Homepage"; -import { default as SingleItemPage } from "../APP/pages/shop/pages/SingleItemPage"; -import { default as Layout } from "../APP/pages/Layout"; -import { default as Products } from "../APP/pages/products2/Products"; -import { default as Resources } from "../APP/pages/resources/Resources"; -import { default as Checkout } from "../APP/pages/shop/pages/Checkout"; -import { default as AboutUs } from "../APP/pages/aboutUs/AboutUs"; -import { default as CommunityPage } from "../APP/pages/community/CommunityPage"; -import { default as DonatePage } from "../APP/pages/donate/DonatePage"; -import { default as Categories } from "../APP/pages/shop/pages/Categories"; -import { default as SingleEvent } from "../APP/pages/community/sections/eventsSection/SingleEvents/SingleEvent"; -import { default as EventsPage } from "../APP/pages/events/pages/EventsPage"; -import { default as EventsSection } from "../APP/pages/events/sections/eventsSection/EventsSection"; -import { default as Blogs } from "../APP/pages/blogs/Blogs"; -import { default as Blog } from "../APP/pages/blog/Blog"; -import { default as SingleProductDonation } from "../APP/pages/donate/pages/SingleProductDonatePage"; -import { default as IndividualChapter } from "../APP/pages/chapter/pages/IndividualChapter"; - -export { - LandingPage, - Homepage, - Checkout, - SingleItemPage, - Layout, - Products, - Resources, - AboutUs, - Categories, - CommunityPage, - DonatePage, - SingleEvent, - Blogs, - Blog, - EventsPage, - EventsSection, - SingleProductDonation, - IndividualChapter, -}; +import { default as LandingPage } from "../APP/pages/landingPage/LandingPage"; +import { default as Homepage } from "../APP/pages/shop/pages/Homepage"; +import { default as SingleItemPage } from "../APP/pages/shop/pages/SingleItemPage"; +import { default as Layout } from "../APP/pages/Layout"; +import { default as Products } from "../APP/pages/products2/Products"; +import { default as Resources } from "../APP/pages/resources/Resources"; +import { default as Checkout } from "../APP/pages/shop/pages/Checkout"; +import { default as AboutUs } from "../APP/pages/aboutUs/AboutUs"; +import { default as CommunityPage } from "../APP/pages/community/CommunityPage"; +import { default as DonatePage } from "../APP/pages/donate/DonatePage"; +import { default as Categories } from "../APP/pages/shop/pages/Categories"; +import { default as SingleEvent } from "../APP/pages/community/sections/eventsSection/SingleEvents/SingleEvent"; +import { default as EventsPage } from "../APP/pages/events/pages/EventsPage"; +import { default as EventsSection } from "../APP/pages/events/sections/eventsSection/EventsSection"; +import { default as Blogs } from "../APP/pages/blogs/Blogs"; +import { default as Blog } from "../APP/pages/blog/Blog"; +import { default as SingleProductDonation } from "../APP/pages/donate/pages/SingleProductDonatePage"; +import { default as IndividualChapter } from "../APP/pages/chapter/pages/IndividualChapter"; + +export { + LandingPage, + Homepage, + Checkout, + SingleItemPage, + Layout, + Products, + Resources, + AboutUs, + Categories, + CommunityPage, + DonatePage, + SingleEvent, + Blogs, + Blog, + EventsPage, + EventsSection, + SingleProductDonation, + IndividualChapter, +}; diff --git a/src/APP/pages/Layout.jsx b/src/APP/pages/Layout.jsx index 85228581..93fedcf7 100644 --- a/src/APP/pages/Layout.jsx +++ b/src/APP/pages/Layout.jsx @@ -1,27 +1,27 @@ -import { Outlet, useLocation } from "react-router-dom"; - -import { Header2, Footer2 } from "../components"; -import { useEffect } from "react"; - -const ScrollToTopOnLinkClick = () => { - const{ pathname } = useLocation(); - - useEffect(() => { - window.scrollTo(0, 0); - }, [pathname]); - - return null; -}; - -const Layout = () => { - return ( -
- - - - -
- ); -}; - -export default Layout; +import { Outlet, useLocation } from "react-router-dom"; + +import { Header2, Footer2 } from "../components"; +import { useEffect } from "react"; + +const ScrollToTopOnLinkClick = () => { + const{ pathname } = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + }, [pathname]); + + return null; +}; + +const Layout = () => { + return ( +
+ + + + +
+ ); +}; + +export default Layout; diff --git a/src/APP/pages/aboutUs/data.js b/src/APP/pages/aboutUs/data.js index 2aae53c8..b7d79512 100644 --- a/src/APP/pages/aboutUs/data.js +++ b/src/APP/pages/aboutUs/data.js @@ -1,65 +1,65 @@ -import { - catherine, - fred, - hudson, - ian, - james, - juma, - marlyn, - murabula, - sharon, - waithaka, -} from "../../../assets/images/aboutPage"; - -export const LeadershipData = [ - { - name: "Fred Ouko", - title: "Founder", - image: fred, - }, - { - name: "Catherine Kiiru", - title: "Dev Relations & Opensource Programs", - image: catherine, - }, - { - name: "James Otieno", - title: "Community Manager", - image: james, - }, - { - name: "Hudson Obai", - title: "Head of Engineering", - image: hudson, - }, - { - name: "Ian Mugenya", - title: "Mentorship Program Lead", - image: ian, - }, - { - name: "Marlyn Mayienga", - title: "Program Manager", - image: marlyn, - }, - { - name: "Sharon Jebitok", - title: "Head of Chapters and Volunteers", - image: sharon, - }, - { - name: "Waithaka Waweru", - title: "Dev Relations and Events", - image: waithaka, - }, - { - name: "Juma Lawrence", - title: "Head of Communication", - image: juma, - }, - { - name: "Racheal Murabula", - title: "Lead Android Engineer", - image: murabula, - }, -]; +import { + catherine, + fred, + hudson, + ian, + james, + juma, + marlyn, + murabula, + sharon, + waithaka, +} from "../../../assets/images/aboutPage"; + +export const LeadershipData = [ + { + name: "Fred Ouko", + title: "Founder", + image: fred, + }, + { + name: "Catherine Kiiru", + title: "Dev Relations & Opensource Programs", + image: catherine, + }, + { + name: "James Otieno", + title: "Community Manager", + image: james, + }, + { + name: "Hudson Obai", + title: "Head of Engineering", + image: hudson, + }, + { + name: "Ian Mugenya", + title: "Mentorship Program Lead", + image: ian, + }, + { + name: "Marlyn Mayienga", + title: "Program Manager", + image: marlyn, + }, + { + name: "Sharon Jebitok", + title: "Head of Chapters and Volunteers", + image: sharon, + }, + { + name: "Waithaka Waweru", + title: "Dev Relations and Events", + image: waithaka, + }, + { + name: "Juma Lawrence", + title: "Head of Communication", + image: juma, + }, + { + name: "Racheal Murabula", + title: "Lead Android Engineer", + image: murabula, + }, +]; diff --git a/src/APP/pages/aboutUs/sections/HeroSection.jsx b/src/APP/pages/aboutUs/sections/HeroSection.jsx index 5f3c56a4..f9ee56fe 100644 --- a/src/APP/pages/aboutUs/sections/HeroSection.jsx +++ b/src/APP/pages/aboutUs/sections/HeroSection.jsx @@ -1,55 +1,55 @@ -import React from "react"; - -import { aboutImg2, heroImg } from "../../../../assets/images/aboutPage"; - -function HeroSection() { - return ( -
-
-
-

- About us -

-

- A community of innovators, building a space for African tech - talents... -

-
-

- SpaceYaTech is a language and stack agnostic community of technology - enthusiasts with membership across Kenya, Tanzania, Nigeria and - pockets of Africa. We welcome techies from all backgrounds to build a - vibrant community of innovators of tech, users of tech and tech - evangelists. -

- space ya tech -
-
-
- space ya tech -
-
-

- Our activities center around designing and building software and - hardware solutions for the most salient needs we see in the society, - through a unique open-source model that gets our community members - paid for their skills. SpaceYaTech also aims to develop capacity in - the fields of software development and design to help build the - future workforce and start-up founders in Africa. -

-

- We aim to be an inclusive community, where the contributions of - everyone who wishes to join and be part of a movement to transform - Africa through, can be appreciated and celebrated. -

-
-
-
- ); -} - -export default HeroSection; +import React from "react"; + +import { aboutImg2, heroImg } from "../../../../assets/images/aboutPage"; + +function HeroSection() { + return ( +
+
+
+

+ About us +

+

+ A community of innovators, building a space for African tech + talents... +

+
+

+ SpaceYaTech is a language and stack agnostic community of technology + enthusiasts with membership across Kenya, Tanzania, Nigeria and + pockets of Africa. We welcome techies from all backgrounds to build a + vibrant community of innovators of tech, users of tech and tech + evangelists. +

+ space ya tech +
+
+
+ space ya tech +
+
+

+ Our activities center around designing and building software and + hardware solutions for the most salient needs we see in the society, + through a unique open-source model that gets our community members + paid for their skills. SpaceYaTech also aims to develop capacity in + the fields of software development and design to help build the + future workforce and start-up founders in Africa. +

+

+ We aim to be an inclusive community, where the contributions of + everyone who wishes to join and be part of a movement to transform + Africa through, can be appreciated and celebrated. +

+
+
+
+ ); +} + +export default HeroSection; diff --git a/src/APP/pages/aboutUs/sections/LeadershipSection.jsx b/src/APP/pages/aboutUs/sections/LeadershipSection.jsx index 894e1dcc..f9c9736b 100644 --- a/src/APP/pages/aboutUs/sections/LeadershipSection.jsx +++ b/src/APP/pages/aboutUs/sections/LeadershipSection.jsx @@ -1,231 +1,231 @@ -import React, { Fragment, useState, useRef } from "react"; -import { Dialog, Transition } from "@headlessui/react"; -import emailjs from "@emailjs/browser"; - -import { Caroussel } from "../../../components"; -import { closeIcon } from "../../../../assets/images/icons"; -import { LeadershipData } from "../data"; -import { buildComm } from "../../../../assets/images/aboutPage"; - -// env var -const SERVICE_ID = - import.meta.env.VITE_SERVICE_ID || window._env_.VITE_SERVICE_ID; -const TEMPLATE_ID = - import.meta.env.VITE_TEMPLATE_ID || window._env_.VITE_TEMPLATE_ID; -const PUBLIC_ID = import.meta.env.VITE_PUBLIC_ID || window._env_.VITE_PUBLIC_ID; - -function LeadershipSection() { - const [isOpen, setIsOpen] = useState(false); - const [loading, setLoading] = useState(false); - - const [name, setName] = useState(""); - const [email, setEmail] = useState(""); - const [message, setMessage] = useState(""); - const [phoneNumber, setPhoneNumber] = useState(""); - - const formRef = useRef(); - - function closeModal() { - setIsOpen(false); - } - - function openModal() { - setIsOpen(true); - } - - const handleSubmit = (e) => { - e.preventDefault(); - setLoading(true); - - emailjs - .send( - `${SERVICE_ID}`, - `${TEMPLATE_ID}`, - { - from_name: name, - to_name: "SYT Admin", - from_email: email, - to_email: "partnerships@spaceyatech.com", - message, - phoneNumber, - }, - `${PUBLIC_ID}` - ) - .then( - (result) => { - alert("Thank you. We will get back to you as soon possible."); - - setLoading(false); - setName(""); - setEmail(""); - setMessage(""); - setPhoneNumber(""); - closeModal(); - }, - (error) => { - setLoading(false); - console.log(error.text); - closeModal(); - alert("Sorry, something went wrong! 💀"); - } - ); - }; - return ( -
-

- Meet our leadership -

- - - -
-
-

- Committed to building community -

-

- We partner with like-minded organizations to build the workforce for - Africa’s transformation. -

-

- We have narrowed our focus to do just one thing; building capacity - in tech. We partner with individuals, organizations and public - institutions to mentor and coach young people, between the ages of - 18-35 in the technology skills they need to build the software that - power the world. -

-

- {" "} - We therefore focus our energies and resources on ensuring that those - getting in a tech career, and specifically IT, are directed to the - right resources, connected with the right people in industry for - mentorship and connected with job opportunities where they can earn - from their hard work. -

- - - - {/* Email us Modal */} - - closeModal()} - > - -
- - -
-
- - - -
- - Let’s build something great together! - - -

- We are excited about the possibility of partnering - with you. Share a few details with us and let’s - explore how we can collaborate for mutual success. -

- -
- setName(e.target.value)} - /> - - setEmail(e.target.value)} - /> - - setPhoneNumber(e.target.value)} - /> - -