diff --git a/src/api/project/project-featured.js b/src/api/project/project-featured.js new file mode 100644 index 0000000..ecce4fa --- /dev/null +++ b/src/api/project/project-featured.js @@ -0,0 +1,19 @@ +export default async function ProjectFeatured() { + try { + const res = await fetch(process.env.NEXT_PUBLIC_HOST + "/" + process.env.NEXT_PUBLIC_VERSION + "/project/featured/project", { + method: 'GET', + headers: { + 'Accept': '*/*', + 'Content-Type': 'application/json', + }, + }).then((res) => res.json()); + + if (res.status === 200) { + return {status: "200", data: res.data}; + } else { + return {status: "err"}; + } + } catch { + return {status: "err"}; + } +}; \ No newline at end of file diff --git a/src/app/Credits.js b/src/app/Credits.js index 9e1a4ce..a896496 100644 --- a/src/app/Credits.js +++ b/src/app/Credits.js @@ -9,7 +9,7 @@ export default function Credits() {

Meet the masterminds

- +
diff --git a/src/app/Faqs.js b/src/app/Faqs.js index ce87642..c1c1e7e 100644 --- a/src/app/Faqs.js +++ b/src/app/Faqs.js @@ -39,8 +39,8 @@ export default function Faqs() { ] return ( -
-

FAQS

+
+

FAQS

{content.map((item, index) => (
@@ -51,9 +51,14 @@ export default function Faqs() {
{activeIndices.includes(index) && ( -
- {item.desc} -
+ <> + +
+ {item.desc} +
+ )}
diff --git a/src/app/Featured.js b/src/app/Featured.js index ef5984c..2bd11e1 100644 --- a/src/app/Featured.js +++ b/src/app/Featured.js @@ -1,27 +1,50 @@ +"use client"; + +import Link from 'next/link'; import Image from 'next/image'; +import { useEffect, useState } from 'react'; import { featured } from './dummy'; +import ProjectFeatured from '@/api/project/project-featured'; + export default function Featured({ styles }) { + + const [featuredData, setFeaturedData] = useState([]); + + const getFeaturedProject = async () => { + const res = await ProjectFeatured(); + + if (res.status === "200") { + setFeaturedData(res.data); + } + } + + useEffect(() => { + getFeaturedProject(); + }, []); + return (
- + title
{ - featured.map((element, index) => ( + (featuredData.length !== 0) && featuredData.map((element, index) => (
-
- thumbnail -
- logo + +
+ thumbnail +
+ logo +
-
+ { - index != featured.length - 1 ? ( -
+ index != featuredData.length - 1 ? ( +
) : ( <> ) diff --git a/src/app/Header.js b/src/app/Header.js index 832fff8..2ca7f64 100644 --- a/src/app/Header.js +++ b/src/app/Header.js @@ -14,22 +14,27 @@ export default function Header() { } return ( -
+
scrollToSection("main")}> - + sersow=logo
-
- - -
+
-
diff --git a/src/app/Join.js b/src/app/Join.js index 58c4480..bba4f9c 100644 --- a/src/app/Join.js +++ b/src/app/Join.js @@ -7,7 +7,7 @@ import UpiWhite from "../../public/images/Join/UpiWhite.svg"; export default function Join() { return (
- UPI LOGO + UPI LOGO

if you have upi.edu account

@@ -15,7 +15,7 @@ export default function Join() {
- +
diff --git a/src/app/Main.js b/src/app/Main.js index 491ebeb..526b698 100644 --- a/src/app/Main.js +++ b/src/app/Main.js @@ -6,16 +6,22 @@ import font from "./font.module.css"; export default function Main() { return (
- + main-background
-
+
-

Howdy Savvy!

-

Discover enormous projects at our showcase

+

Howdy Savvy!

+

Discover enormous projects at our showcase

-
diff --git a/src/components/static/Footer.js b/src/components/static/Footer.js index 8726ba7..fb25451 100644 --- a/src/components/static/Footer.js +++ b/src/components/static/Footer.js @@ -14,8 +14,9 @@ export default function Footer({ transparent }) {
-