Skip to content

Commit

Permalink
feat: Updated src/pages/index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Dec 12, 2023
1 parent 7702236 commit 70ff794
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* This file handles the rendering of course cards on the index page of the application.
* Each course card displays information about a specific course, including the course slug, image, title, badge, and description.
*/

import Image from 'next/image'
import { type NextPage } from 'next'
import Head from 'next/head'
Expand All @@ -22,6 +27,12 @@ import GlobalHeader, {
import GlobalFooter from '~/components/UIUC-Components/GlobalFooter'
import { montserrat_heading, montserrat_paragraph } from 'fonts'

/**
* Home page of the application.
* Renders the main structure and components of the index page, including head, headers, main content,
* and footer.
* It serves as the entry point for users exploring the courses and other features.
*/
const Home: NextPage = () => {
return (
<>
Expand Down Expand Up @@ -191,6 +202,11 @@ const useStyles = createStyles((theme) => ({
},
}))

/**
* This function creates feature cards from the provided mock data.
* It utilizes the useStyles hook for styles and iterates over mock data to build each card.
* The cards are then displayed in a responsive grid.
*/
export function FeaturesCards() {
const { classes, theme } = useStyles()
const features = mockdata.map((feature) => (
Expand Down Expand Up @@ -234,6 +250,11 @@ export function FeaturesCards() {
}

// TODO: USE BETTER CARDS! https://ui.mantine.dev/category/article-cards
/**
* This function generates the course cards to be displayed on the index page.
* It does not take any inputs and does not have any outputs.
* The course cards are hardcoded in the function.
*/
function CourseCard() {
const cards = [
{
Expand Down

0 comments on commit 70ff794

Please sign in to comment.