Skip to content

Commit 8005ef3

Browse files
committed
fixes
1 parent 1e265f7 commit 8005ef3

File tree

3 files changed

+135
-38
lines changed

3 files changed

+135
-38
lines changed

src/app/blogs/[blogId]/page.tsx

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const SingleResourcePage = ({ params }: PageProps) => {
4343
);
4444
}
4545

46-
4746
return (
4847
<div className="w-full justify-center min-h-full">
4948
<div className="bg-blue-50 h-1/2 w-full flex justify-center">
@@ -62,10 +61,54 @@ const SingleResourcePage = ({ params }: PageProps) => {
6261
</div>
6362
</div>
6463
<div className="w-full flex justify-center">
65-
<div className="container py-12 md:py-20 px-10 max-w-[1440px] flex justify-center text-center text-md">
66-
{
67-
currentBlogPost.content
68-
}
64+
<div className="container py-12 md:py-20 px-10 max-w-[1440px] flex justify-center text-md">
65+
<div className="md:w-3/4">
66+
<div className="bg-blue-50 p-4 rounded-lg mb-6 border-l-4 border-blue-500">
67+
<h2 className="text-xl font-semibold text-gray-800 mb-2">Question.</h2>
68+
<p className="text-gray-700">
69+
Were there any particular courses, professors, or projects at BITS that played a key role in shaping
70+
your career path? I would say the theoretical courses in general gave me a hint of what I enjoy.
71+
</p>
72+
</div>
73+
74+
<div className="bg-amber-50 p-4 rounded-lg my-6 border-l-4 border-amber-500">
75+
<p className="italic text-gray-700">
76+
I developed a liking for courses like LICS, DSA, TOC, DAA; which led to me taking electives like
77+
Cryptography and Algebra - I, as I liked Mathy subjects. These helped me get clarity when I started
78+
looking for thesis professors and profiles; and I ended up in a project where I got to use these
79+
skills firsthand.
80+
</p>
81+
</div>
82+
83+
<div className="bg-blue-50 p-4 rounded-lg mb-6 border-l-4 border-blue-500">
84+
<h2 className="text-xl font-semibold text-gray-800 mb-2">Question.</h2>
85+
<p className="text-gray-700">
86+
Given your exceptional academic record, how did you balance maintaining a high CGPA with skill
87+
development, and how would you advise students to navigate the trade-off between investing time in
88+
academics versus building practical skills?
89+
</p>
90+
</div>
91+
92+
<div className="bg-amber-50 p-4 rounded-lg my-6 border-l-4 border-amber-500">
93+
<p className="italic text-gray-700">
94+
The unavoidable fact is a good CGPA becomes very hard to ignore on a profile; be it for a corporate
95+
job application or for an MS. Especially if you are planning to make a career in your core field,
96+
having a good CGPA can often make your path much clearer.
97+
<p className="mb-4">Here&apos;s how I balanced both:</p>
98+
99+
<ul className="list-disc pl-5 space-y-2 mb-6">
100+
<li>Prioritizing coursework while reserving dedicated time for practical projects</li>
101+
<li>Focusing on skill-building internships and research opportunities during semester breaks</li>
102+
<li>Leveraging online resources to supplement academic learning</li>
103+
</ul>
104+
105+
<p className="text-gray-700 font-medium">
106+
At the end of the day, it&apos;s about finding a balance that works best for your goals.
107+
</p>
108+
</p>
109+
</div>
110+
111+
</div>
69112
</div>
70113

71114
</div>

src/app/events/[eventId]/page.tsx

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ interface PageProps {
66
eventId: string
77
}>
88
}
9-
import { EventType } from "@/types";
9+
import { EventType, Resources } from "@/types";
10+
import { getResourceArray } from "@/lib/utils";
11+
import { FaYoutube } from "react-icons/fa";
12+
import { FaGoogleDrive } from "react-icons/fa";
13+
14+
import Link from "next/link";
1015

1116
const SingleEventPage = ({ params }: PageProps) => {
1217
// Unwrap the params Promise using React.use()
@@ -41,6 +46,7 @@ const SingleEventPage = ({ params }: PageProps) => {
4146
</div>
4247
);
4348
}
49+
const resources: Resources[] = getResourceArray(currentEvent)
4450

4551
return (
4652
<div className="w-full justify-center min-h-full">
@@ -59,12 +65,45 @@ const SingleEventPage = ({ params }: PageProps) => {
5965
</div>
6066
</div>
6167
</div>
62-
<div className="w-full flex justify-center">
63-
<div className="container py-12 md:py-20 px-10 max-w-[1440px] flex justify-center text-center text-md">
68+
69+
<div className="w-full grid justify-center grid-cols-10 px-20 gap-20">
70+
<div className="container col-span-8 py-12 md:py-20 max-w-[1440px] flex justify-center text-left text-lg">
6471
{
6572
currentEvent.description
6673
}
6774
</div>
75+
<div className="col-span-2 py-10 rounded-xl flex flex-col gap-4 ">
76+
<div className="font-bold text-2xl underline">
77+
Resource Links
78+
</div>
79+
{
80+
resources.map((ele, index) => {
81+
return (
82+
<div key={index}>
83+
{ele.name == "Youtube" ? (
84+
<Link href={ele.link} target="/">
85+
<div className="flex text-lg gap-3">
86+
<FaYoutube size={30} />
87+
Youtube
88+
</div>
89+
</Link>
90+
) : ""}
91+
{
92+
ele.name == "Drive" ? (
93+
<Link href={ele.link} target="/">
94+
<div className="flex text-lg gap-3">
95+
<FaGoogleDrive size={30} />
96+
Drive
97+
</div>
98+
</Link>
99+
) : ""
100+
}
101+
</div>
102+
)
103+
})
104+
}
105+
106+
</div>
68107

69108
</div>
70109

src/components/home/events-crousel.tsx

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use client";
22
import React, { useEffect, useState } from "react";
3-
import axios from "axios";
3+
// import axios from "axios";
44
import ImageCarousel from "./crousel";
5-
import { EventType } from "@/types";
5+
// import { EventType } from "@/types";
66
import { convertGoogleDriveUrl, getSafeImageUrl } from "@/lib/utils";
7+
// import { link } from "fs";
78

89
interface ImageItem {
910
src: string;
@@ -14,34 +15,48 @@ const EventsCrousel = () => {
1415
const [eventImages, setEventImages] = useState<ImageItem[]>([]);
1516

1617
useEffect(() => {
17-
const getEvents = async () => {
18-
try {
19-
const { data } = await axios.get("/api/events");
20-
const sortedEvents: EventType[] = data
21-
.sort(
22-
(a: EventType, b: EventType) =>
23-
new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
24-
)
25-
.slice(0, 3); // Get only first 3 events
26-
27-
const images = sortedEvents.map((event) => {
28-
const firstImage = event.image.split(",")[0].trim(); // Extract first image
29-
const rawImageUrl = convertGoogleDriveUrl(firstImage);
30-
const safeImage = getSafeImageUrl(rawImageUrl); // Optional cleaner
31-
return {
32-
src: safeImage,
33-
link: `${process.env.NEXT_PUBLIC_FRONTEND_URL}/events/${event.id}`, // You can update this to navigate to event-specific pages later
34-
};
35-
});
36-
37-
setEventImages(images);
38-
} catch (error) {
39-
console.error("Error fetching events:", error);
40-
}
41-
};
42-
43-
getEvents();
44-
}, []);
18+
setEventImages([{ //ps2 2025
19+
src: getSafeImageUrl(convertGoogleDriveUrl("https://drive.google.com/file/d/1eG9PmKUogjtjrMreMmenGdMa0ciuEZCH/view?usp=sharing")),
20+
link: "https://discoverwithsac-bitspilani.in/events/25"
21+
}, {
22+
src: getSafeImageUrl(convertGoogleDriveUrl("https://drive.google.com/file/d/1VNETZa1PA7zC6IjbQivfvw8Fv98nIyYL/view?usp=drive_link")),
23+
link: "https://discoverwithsac-bitspilani.in/events/3" // off campus
24+
}, {
25+
src: getSafeImageUrl(convertGoogleDriveUrl("https://drive.google.com/file/d/1twW8TNZmSu2ZX5TR55-RGKZ8lWnHxJ3c/view?usp=sharing")),
26+
link: "https://discoverwithsac-bitspilani.in/events/16" // RI talk 2025
27+
},
28+
])
29+
}, [])
30+
31+
// useEffect(() => {
32+
// const getEvents = async () => {
33+
// try {
34+
// const { data } = await axios.get("/api/events");
35+
// const sortedEvents: EventType[] = data
36+
// .sort(
37+
// (a: EventType, b: EventType) =>
38+
// new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
39+
// )
40+
// .slice(0, 3); // Get only first 3 events
41+
42+
// const images = sortedEvents.map((event) => {
43+
// const firstImage = event.image.split(",")[0].trim(); // Extract first image
44+
// const rawImageUrl = convertGoogleDriveUrl(firstImage);
45+
// const safeImage = getSafeImageUrl(rawImageUrl); // Optional cleaner
46+
// return {
47+
// src: safeImage,
48+
// link: `${process.env.NEXT_PUBLIC_FRONTEND_URL}/events/${event.id}`, // You can update this to navigate to event-specific pages later
49+
// };
50+
// });
51+
52+
// setEventImages(images);
53+
// } catch (error) {
54+
// console.error("Error fetching events:", error);
55+
// }
56+
// };
57+
58+
// getEvents();
59+
// }, []);
4560

4661
return (
4762
<div>

0 commit comments

Comments
 (0)