From 1be278bffe77351bb1e390973690b1d1a020ada1 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 15 Jul 2026 15:39:39 +0200 Subject: [PATCH 1/9] feat: add Groups page with group listings and search functionality --- src/app/groups/page.tsx | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/app/groups/page.tsx diff --git a/src/app/groups/page.tsx b/src/app/groups/page.tsx new file mode 100644 index 0000000..9621fe6 --- /dev/null +++ b/src/app/groups/page.tsx @@ -0,0 +1,48 @@ +import { FiBook, FiStar } from "react-icons/fi" +import { CardIcon } from "@/components/card-icon" +import { GroupSearch } from "@/components/home/group-search" + +const groups = [ + { + title: "Gruppi Didattici", + caption: "Ingegneria, Architettura, Design, e tutti i gruppi del tuo corso di studi.", + href: "/matricole", + icon: FiBook, + }, + { + title: "Gruppi Extra", + caption: "Affitti, mercatino, eventi, hobby e tutto ciò che riguarda la vita studentesca.", + href: "/projects", + icon: FiStar, + }, +] as const + +export default function Home() { + return ( +
+
+
+

+ Groups +

+ +
+ +
+ {groups.map((group) => ( + + ))} +
+
+
+ ) +} From 111739f6a405a038b8361ad098d7b9cc167638c5 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 15 Jul 2026 15:51:16 +0200 Subject: [PATCH 2/9] fix: update layout and spacing for Groups page --- src/app/groups/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/groups/page.tsx b/src/app/groups/page.tsx index 9621fe6..fc30615 100644 --- a/src/app/groups/page.tsx +++ b/src/app/groups/page.tsx @@ -20,15 +20,15 @@ const groups = [ export default function Home() { return (
-
+
-

+

Groups

-
+
{groups.map((group) => ( Date: Thu, 23 Jul 2026 01:56:22 +0200 Subject: [PATCH 3/9] feat: implement groups page with faculty and course selection wizard --- src/app/groups/didattica/page.tsx | 146 +++++++++++++++++++++++ src/app/groups/page.tsx | 4 +- src/components/card-path-selection.tsx | 4 +- src/components/groups/constants.ts | 44 +++++++ src/components/groups/course-filters.tsx | 67 +++++++++++ src/components/groups/types.ts | 14 +++ src/components/groups/wizard-shell.tsx | 64 ++++++++++ 7 files changed, 339 insertions(+), 4 deletions(-) create mode 100644 src/app/groups/didattica/page.tsx create mode 100644 src/components/groups/constants.ts create mode 100644 src/components/groups/course-filters.tsx create mode 100644 src/components/groups/types.ts create mode 100644 src/components/groups/wizard-shell.tsx diff --git a/src/app/groups/didattica/page.tsx b/src/app/groups/didattica/page.tsx new file mode 100644 index 0000000..a50cf19 --- /dev/null +++ b/src/app/groups/didattica/page.tsx @@ -0,0 +1,146 @@ +import Link from "next/link" +import { notFound } from "next/navigation" +import type { IconType } from "react-icons" +import { FiBook, FiBox, FiChevronRight, FiFeather, FiPenTool } from "react-icons/fi" +import { CardCourse } from "@/components/card-course" +import { CardCourseGroup } from "@/components/card-course-group" +import { CardIcon } from "@/components/card-icon" +import { CardPathSelection } from "@/components/card-path-selection" +import { + FACULTIES, + getCourse, + getCourseFilters, + getCourses, + getFaculty, + getLevel, + LEVELS, +} from "@/components/groups/constants" +import { CourseFilters } from "@/components/groups/course-filters" +import type { WizardParams } from "@/components/groups/types" +import { WizardShell } from "@/components/groups/wizard-shell" + +const FACULTY_ICONS: Record = { + architettura: FiPenTool, + design: FiFeather, + ingegneria: FiBox, +} + +function stepHref(params: Pick) { + const query = new URLSearchParams() + if (params.school) query.set("school", params.school) + if (params.level) query.set("level", params.level) + if (params.course) query.set("course", params.course) + const search = query.toString() + return search ? `/groups/didattica?${search}` : "/groups/didattica" +} + +export default async function DidatticaWizard({ searchParams }: { searchParams: Promise }) { + const { school, level, course, campus, lang } = await searchParams + + if (school && level && course) return + if (school && level) return + if (school) return + + return +} + +function FacultyStep() { + return ( + +
+ {FACULTIES.map((faculty) => ( + + ))} +
+
+ ) +} + +function LevelStep({ school }: { school: string }) { + const faculty = getFaculty(school) + if (!faculty) notFound() + + return ( + +
+ {LEVELS.map((level) => ( + + + + ))} +
+
+ ) +} + +function CourseStep({ + school, + level, + campus, + lang, +}: { + school: string + level: string + campus?: string + lang?: string +}) { + const faculty = getFaculty(school) + const currentLevel = getLevel(level) + if (!faculty || !currentLevel) notFound() + + const { campuses, languages } = getCourseFilters(school, level) + const courses = getCourses(school, level).filter( + (course) => (!campus || course.location === campus) && (!lang || course.language === lang) + ) + + return ( + } + > +
+ {courses.length === 0 && ( +

Nessun corso corrisponde ai filtri.

+ )} + {courses.map((course) => ( + + + + ))} +
+
+ ) +} + +function GroupsResult({ school, level, course }: { school: string; level: string; course: string }) { + const currentCourse = getCourse(school, level, course) + const currentLevel = getLevel(level) + if (!currentCourse || !currentLevel) notFound() + + return ( +
+
+

{currentCourse.name}

+

Laurea {currentLevel.name}

+
+ +
+ + +
+
+ ) +} diff --git a/src/app/groups/page.tsx b/src/app/groups/page.tsx index fc30615..809f526 100644 --- a/src/app/groups/page.tsx +++ b/src/app/groups/page.tsx @@ -6,13 +6,13 @@ const groups = [ { title: "Gruppi Didattici", caption: "Ingegneria, Architettura, Design, e tutti i gruppi del tuo corso di studi.", - href: "/matricole", + href: "/groups/didattica", icon: FiBook, }, { title: "Gruppi Extra", caption: "Affitti, mercatino, eventi, hobby e tutto ciò che riguarda la vita studentesca.", - href: "/projects", + href: "/groups/extra", icon: FiStar, }, ] as const diff --git a/src/components/card-path-selection.tsx b/src/components/card-path-selection.tsx index f615c3e..57c211d 100644 --- a/src/components/card-path-selection.tsx +++ b/src/components/card-path-selection.tsx @@ -2,9 +2,9 @@ import type { IconType } from "react-icons" import { BsBook } from "react-icons/bs" import { Card, CardAction, CardContent } from "./ui/card" -export function CardPathSelection({ caption, icon: Icon = BsBook }: { caption: string; icon?: IconType }) { +export function CardPathSelection({ caption, icon: Icon = BsBook, className }: { caption: string; icon?: IconType; className?: string }) { return ( - + {caption} diff --git a/src/components/groups/constants.ts b/src/components/groups/constants.ts new file mode 100644 index 0000000..24a32ab --- /dev/null +++ b/src/components/groups/constants.ts @@ -0,0 +1,44 @@ +import type { Course, Faculty, Level } from "@/components/groups/types" + +export const FACULTIES: Faculty[] = [ + { slug: "architettura", name: "Scuola di Architettura" }, + { slug: "design", name: "Scuola di Design" }, + { slug: "ingegneria", name: "Scuole di Ingegneria" }, +] + +export const LEVELS: Level[] = [ + { slug: "triennale", name: "Triennale (o Ciclo Unico)" }, + { slug: "magistrale", name: "Magistrale" }, +] + +export const COURSES: Record = { + "design/triennale": [ + { slug: "design-prodotto", name: "Design del Prodotto", location: "Milano Bovisa", language: "ITA" }, + { slug: "design-comunicazione", name: "Design della Comunicazione", location: "Milano Bovisa", language: "ITA" }, + { slug: "design-moda", name: "Design della Moda", location: "Milano Bovisa", language: "ITA" }, + ], +} + +export function getFaculty(slug: string) { + return FACULTIES.find((faculty) => faculty.slug === slug) +} + +export function getLevel(slug: string) { + return LEVELS.find((level) => level.slug === slug) +} + +export function getCourses(faculty: string, level: string) { + return COURSES[`${faculty}/${level}`] ?? [] +} + +export function getCourse(faculty: string, level: string, slug: string) { + return getCourses(faculty, level).find((course) => course.slug === slug) +} + +export function getCourseFilters(faculty: string, level: string) { + const courses = getCourses(faculty, level) + return { + campuses: [...new Set(courses.map((course) => course.location))], + languages: [...new Set(courses.map((course) => course.language))], + } +} diff --git a/src/components/groups/course-filters.tsx b/src/components/groups/course-filters.tsx new file mode 100644 index 0000000..2d09e19 --- /dev/null +++ b/src/components/groups/course-filters.tsx @@ -0,0 +1,67 @@ +"use client" + +import { usePathname, useRouter, useSearchParams } from "next/navigation" +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" + +const ALL = "all" + +type FilterSelectProps = { + label: string + value: string + options: string[] + onChange: (value: string) => void +} + +function FilterSelect({ label, value, options, onChange }: FilterSelectProps) { + return ( + + ) +} + +export function CourseFilters({ campuses, languages }: { campuses: string[]; languages: string[] }) { + const router = useRouter() + const pathname = usePathname() + const searchParams = useSearchParams() + + const update = (key: string, value: string) => { + const params = new URLSearchParams(searchParams.toString()) + if (value === ALL) params.delete(key) + else params.set(key, value) + const query = params.toString() + router.push(query ? `${pathname}?${query}` : pathname) + } + + return ( +
+
+ update("campus", value)} + /> +
+
+ update("lang", value)} + /> +
+
+ ) +} diff --git a/src/components/groups/types.ts b/src/components/groups/types.ts new file mode 100644 index 0000000..95beeec --- /dev/null +++ b/src/components/groups/types.ts @@ -0,0 +1,14 @@ +export type Campus = "Milano Leonardo" | "Milano Bovisa" | "Cremona" | "Lecco" | "Mantova" | "Piacenza" | "Xi'an" +export type Language = "ITA" | "ENG" + +export type Faculty = { slug: string; name: string } +export type Level = { slug: string; name: string } +export type Course = { slug: string; name: string; location: Campus; language: Language } + +export type WizardParams = { + school?: string + level?: string + course?: string + campus?: string + lang?: string +} diff --git a/src/components/groups/wizard-shell.tsx b/src/components/groups/wizard-shell.tsx new file mode 100644 index 0000000..dd7cb74 --- /dev/null +++ b/src/components/groups/wizard-shell.tsx @@ -0,0 +1,64 @@ +"use client" + +import { useRouter } from "next/navigation" +import type { ReactNode } from "react" +import { FiArrowLeft, FiX } from "react-icons/fi" +import { Glass } from "@/components/glass" +import { cn } from "@/lib/utils" + +const STEPS = ["Facoltà", "Triennale/Magistrale", "Corso"] as const + +const iconButton = "grid size-10 shrink-0 place-items-center rounded-full bg-white/60" + +type WizardShellProps = { + activeStep: number + title: string + caption?: string + action?: ReactNode + children: ReactNode +} + +export function WizardShell({ activeStep, title, caption, action, children }: WizardShellProps) { + const router = useRouter() + + return ( +
+ +
+ + +
    + {STEPS.map((label, index) => ( +
  1. + {label} +
  2. + ))} +
+ + +
+ +
+
+
+ {caption &&

{caption}

} +

{title}

+
+ {action &&
{action}
} +
+
{children}
+
+
+
+ ) +} From 29005332d8bdc3ff300e015d1214bfab3e0ca653 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 19 Aug 2026 23:53:10 +0200 Subject: [PATCH 4/9] feat: implement didattica wizard steps and components for faculty, level, and course selection --- .../[school]/[level]/[course]/page.tsx | 10 ++ .../didattica/[school]/[level]/page.tsx | 14 ++ src/app/groups/didattica/[school]/page.tsx | 6 + src/app/groups/didattica/page.tsx | 145 +----------------- src/app/groups/page.tsx | 5 +- src/components/button-icon.tsx | 25 +-- src/components/card-course-group.tsx | 21 ++- src/components/card-course.tsx | 34 ++-- src/components/card-icon/index.tsx | 8 + src/components/card-icon/types.ts | 1 + src/components/groups/constants.ts | 2 +- src/components/groups/course-filters.tsx | 8 +- src/components/groups/course-step.tsx | 56 +++++++ src/components/groups/faculty-step.tsx | 30 ++++ src/components/groups/groups-result.tsx | 65 ++++++++ src/components/groups/level-step.tsx | 30 ++++ src/components/groups/step-href.ts | 4 + src/components/groups/types.ts | 5 +- src/components/groups/wizard-shell.tsx | 70 ++++++--- src/components/home/group-search.tsx | 4 +- src/components/ui/button.tsx | 1 + src/styles/typography.css | 5 + 22 files changed, 343 insertions(+), 206 deletions(-) create mode 100644 src/app/groups/didattica/[school]/[level]/[course]/page.tsx create mode 100644 src/app/groups/didattica/[school]/[level]/page.tsx create mode 100644 src/app/groups/didattica/[school]/page.tsx create mode 100644 src/components/groups/course-step.tsx create mode 100644 src/components/groups/faculty-step.tsx create mode 100644 src/components/groups/groups-result.tsx create mode 100644 src/components/groups/level-step.tsx create mode 100644 src/components/groups/step-href.ts diff --git a/src/app/groups/didattica/[school]/[level]/[course]/page.tsx b/src/app/groups/didattica/[school]/[level]/[course]/page.tsx new file mode 100644 index 0000000..ac593d4 --- /dev/null +++ b/src/app/groups/didattica/[school]/[level]/[course]/page.tsx @@ -0,0 +1,10 @@ +import { GroupsResult } from "@/components/groups/groups-result" + +export default async function DidatticaGroupsResultPage({ + params, +}: { + params: Promise<{ school: string; level: string; course: string }> +}) { + const { school, level, course } = await params + return +} diff --git a/src/app/groups/didattica/[school]/[level]/page.tsx b/src/app/groups/didattica/[school]/[level]/page.tsx new file mode 100644 index 0000000..251d1a8 --- /dev/null +++ b/src/app/groups/didattica/[school]/[level]/page.tsx @@ -0,0 +1,14 @@ +import { CourseStep } from "@/components/groups/course-step" +import type { CourseSearchParams } from "@/components/groups/types" + +export default async function DidatticaCoursePage({ + params, + searchParams, +}: { + params: Promise<{ school: string; level: string }> + searchParams: Promise +}) { + const { school, level } = await params + const { campus, lang } = await searchParams + return +} diff --git a/src/app/groups/didattica/[school]/page.tsx b/src/app/groups/didattica/[school]/page.tsx new file mode 100644 index 0000000..28beb6b --- /dev/null +++ b/src/app/groups/didattica/[school]/page.tsx @@ -0,0 +1,6 @@ +import { LevelStep } from "@/components/groups/level-step" + +export default async function DidatticaLevelPage({ params }: { params: Promise<{ school: string }> }) { + const { school } = await params + return +} diff --git a/src/app/groups/didattica/page.tsx b/src/app/groups/didattica/page.tsx index a50cf19..7f1a91a 100644 --- a/src/app/groups/didattica/page.tsx +++ b/src/app/groups/didattica/page.tsx @@ -1,146 +1,5 @@ -import Link from "next/link" -import { notFound } from "next/navigation" -import type { IconType } from "react-icons" -import { FiBook, FiBox, FiChevronRight, FiFeather, FiPenTool } from "react-icons/fi" -import { CardCourse } from "@/components/card-course" -import { CardCourseGroup } from "@/components/card-course-group" -import { CardIcon } from "@/components/card-icon" -import { CardPathSelection } from "@/components/card-path-selection" -import { - FACULTIES, - getCourse, - getCourseFilters, - getCourses, - getFaculty, - getLevel, - LEVELS, -} from "@/components/groups/constants" -import { CourseFilters } from "@/components/groups/course-filters" -import type { WizardParams } from "@/components/groups/types" -import { WizardShell } from "@/components/groups/wizard-shell" - -const FACULTY_ICONS: Record = { - architettura: FiPenTool, - design: FiFeather, - ingegneria: FiBox, -} - -function stepHref(params: Pick) { - const query = new URLSearchParams() - if (params.school) query.set("school", params.school) - if (params.level) query.set("level", params.level) - if (params.course) query.set("course", params.course) - const search = query.toString() - return search ? `/groups/didattica?${search}` : "/groups/didattica" -} - -export default async function DidatticaWizard({ searchParams }: { searchParams: Promise }) { - const { school, level, course, campus, lang } = await searchParams - - if (school && level && course) return - if (school && level) return - if (school) return +import { FacultyStep } from "@/components/groups/faculty-step" +export default function DidatticaWizard() { return } - -function FacultyStep() { - return ( - -
- {FACULTIES.map((faculty) => ( - - ))} -
-
- ) -} - -function LevelStep({ school }: { school: string }) { - const faculty = getFaculty(school) - if (!faculty) notFound() - - return ( - -
- {LEVELS.map((level) => ( - - - - ))} -
-
- ) -} - -function CourseStep({ - school, - level, - campus, - lang, -}: { - school: string - level: string - campus?: string - lang?: string -}) { - const faculty = getFaculty(school) - const currentLevel = getLevel(level) - if (!faculty || !currentLevel) notFound() - - const { campuses, languages } = getCourseFilters(school, level) - const courses = getCourses(school, level).filter( - (course) => (!campus || course.location === campus) && (!lang || course.language === lang) - ) - - return ( - } - > -
- {courses.length === 0 && ( -

Nessun corso corrisponde ai filtri.

- )} - {courses.map((course) => ( - - - - ))} -
-
- ) -} - -function GroupsResult({ school, level, course }: { school: string; level: string; course: string }) { - const currentCourse = getCourse(school, level, course) - const currentLevel = getLevel(level) - if (!currentCourse || !currentLevel) notFound() - - return ( -
-
-

{currentCourse.name}

-

Laurea {currentLevel.name}

-
- -
- - -
-
- ) -} diff --git a/src/app/groups/page.tsx b/src/app/groups/page.tsx index 809f526..5ee5fbe 100644 --- a/src/app/groups/page.tsx +++ b/src/app/groups/page.tsx @@ -8,19 +8,21 @@ const groups = [ caption: "Ingegneria, Architettura, Design, e tutti i gruppi del tuo corso di studi.", href: "/groups/didattica", icon: FiBook, + cta: "Inizia", }, { title: "Gruppi Extra", caption: "Affitti, mercatino, eventi, hobby e tutto ciò che riguarda la vita studentesca.", href: "/groups/extra", icon: FiStar, + cta: "Esplora", }, ] as const export default function Home() { return (
-
+

Groups @@ -36,6 +38,7 @@ export default function Home() { description={group.caption} href={group.href} icon={group.icon} + cta={group.cta} align="start" className="w-full max-w-108" size="compact" diff --git a/src/components/button-icon.tsx b/src/components/button-icon.tsx index f2d3325..052fe41 100644 --- a/src/components/button-icon.tsx +++ b/src/components/button-icon.tsx @@ -1,22 +1,27 @@ +import type { ComponentProps } from "react" import type { IconType } from "react-icons" import { Button } from "./ui/button" +type ButtonIconProps = ComponentProps & { + icon: IconType + text?: string + iconPosition?: "left" | "right" + iconClassName?: string +} + export function ButtonIcon({ - variant = "primary", icon: Icon, text, iconPosition = "left", -}: { - variant?: "primary" | "tertiary" | "tertiaryBlur" - icon: IconType - text: string - iconPosition?: "left" | "right" -}) { + iconClassName, + size, + ...props +}: ButtonIconProps) { return ( - ) } diff --git a/src/components/card-course-group.tsx b/src/components/card-course-group.tsx index 46cb821..35e5fc6 100644 --- a/src/components/card-course-group.tsx +++ b/src/components/card-course-group.tsx @@ -6,7 +6,7 @@ import { cn } from "@/lib/utils" import { Card, CardAction, CardTitle } from "./ui/card" export const cardCourseGroupVariants = cva( - "flex h-fit w-full flex-row items-center gap-5 px-7.5 py-6.25 font-normal leading-6 tracking-[0.03125rem]", + "flex h-fit w-full min-w-0 flex-1 flex-row items-center gap-3 px-5 py-4 font-normal leading-6 tracking-[0.03125rem] sm:gap-5 sm:px-7.5 sm:py-6.25", { variants: { secondary: { @@ -27,21 +27,30 @@ export function CardCourseGroup({ hasTelegram = true, iconTelegram: IconTelegram = LiaTelegramPlane, secondary = false, + stacked = false, }: { groupName: string hasWhatsapp?: boolean iconWhatsApp?: IconType hasTelegram?: boolean iconTelegram?: IconType + stacked?: boolean } & VariantProps) { - const actionClassName = cn("rounded-full p-3.75", secondary ? "bg-[#51A2FF]" : "bg-[#74D4FF]") + const actionClassName = cn("rounded-full p-2 sm:p-3.75", secondary ? "bg-[#51A2FF]" : "bg-[#74D4FF]") return ( - - + + {groupName} - {hasWhatsapp && } - {hasTelegram && } +
+ {hasWhatsapp && } + {hasTelegram && } +
) } diff --git a/src/components/card-course.tsx b/src/components/card-course.tsx index 672cea2..fdad659 100644 --- a/src/components/card-course.tsx +++ b/src/components/card-course.tsx @@ -1,16 +1,14 @@ import type { IconType } from "react-icons" -import { CiGlobe } from "react-icons/ci" -import { FaAngleRight } from "react-icons/fa6" -import { IoLocationOutline } from "react-icons/io5" +import { FiChevronRight, FiGlobe, FiMapPin } from "react-icons/fi" import { Card, CardAction, CardContent } from "./ui/card" export function CardCourse({ courseName, - iconLocation: IconLocation = IoLocationOutline, + iconLocation: IconLocation = FiMapPin, location = "Milano Leonardo", - iconLanguage: IconLanguage = CiGlobe, + iconLanguage: IconLanguage = FiGlobe, language = "ITA", - iconSelect: IconSelect = FaAngleRight, + iconSelect: IconSelect = FiChevronRight, }: { courseName: string iconLocation?: IconType @@ -20,16 +18,20 @@ export function CardCourse({ iconSelect?: IconType }) { return ( - - {courseName} - - {location} - - - {language} - - - + +
+ {courseName} +
+ + {location} + + + {language} + +
+
+ +
) diff --git a/src/components/card-icon/index.tsx b/src/components/card-icon/index.tsx index a38598f..27bba12 100644 --- a/src/components/card-icon/index.tsx +++ b/src/components/card-icon/index.tsx @@ -1,4 +1,5 @@ import { Glass } from "@/components/glass" +import { buttonVariants } from "@/components/ui/button" import { cn } from "@/lib/utils" import { BasicCardMedia } from "./basic-card-media" import { DescriptionCardMedia } from "./description-card-media" @@ -10,6 +11,7 @@ import { getAlignmentClasses, getCardPaddingClasses, getContentGapClasses, getTi export function CardIcon(props: CardIconProps) { const { title, icon, size = "md", href, hoverEffect = false, align = "center", className } = props const description = "description" in props ? props.description : undefined + const cta = "cta" in props ? props.cta : undefined const Root = href ? "a" : "div" const isDescriptionCard = Boolean(description) const isInlineAligned = align === "inline" @@ -78,6 +80,12 @@ export function CardIcon(props: CardIconProps) {

)}

+ + {cta && ( +
+ {cta} +
+ )}
)} diff --git a/src/components/card-icon/types.ts b/src/components/card-icon/types.ts index 1ac84a5..5c40083 100644 --- a/src/components/card-icon/types.ts +++ b/src/components/card-icon/types.ts @@ -27,4 +27,5 @@ export type SharedCardProps = { export type CardIconProps = SharedCardProps & { description?: string + cta?: string } diff --git a/src/components/groups/constants.ts b/src/components/groups/constants.ts index 24a32ab..7fac9fe 100644 --- a/src/components/groups/constants.ts +++ b/src/components/groups/constants.ts @@ -7,7 +7,7 @@ export const FACULTIES: Faculty[] = [ ] export const LEVELS: Level[] = [ - { slug: "triennale", name: "Triennale (o Ciclo Unico)" }, + { slug: "triennale", name: "Triennale" }, { slug: "magistrale", name: "Magistrale" }, ] diff --git a/src/components/groups/course-filters.tsx b/src/components/groups/course-filters.tsx index 2d09e19..123a197 100644 --- a/src/components/groups/course-filters.tsx +++ b/src/components/groups/course-filters.tsx @@ -41,20 +41,20 @@ export function CourseFilters({ campuses, languages }: { campuses: string[]; lan if (value === ALL) params.delete(key) else params.set(key, value) const query = params.toString() - router.push(query ? `${pathname}?${query}` : pathname) + router.replace(query ? `${pathname}?${query}` : pathname) } return (
-
+
update("campus", value)} />
-
+
(!campus || course.location === campus) && (!lang || course.language === lang) + ) + + return ( + } + > +
+ {courses.length === 0 && ( +

Nessun corso corrisponde ai filtri.

+ )} + {courses.map((course) => ( + + + + ))} +
+
+ ) +} diff --git a/src/components/groups/faculty-step.tsx b/src/components/groups/faculty-step.tsx new file mode 100644 index 0000000..74549a7 --- /dev/null +++ b/src/components/groups/faculty-step.tsx @@ -0,0 +1,30 @@ +import type { IconType } from "react-icons" +import { FiBox, FiFeather, FiPenTool } from "react-icons/fi" +import { CardIcon } from "@/components/card-icon" +import { FACULTIES } from "@/components/groups/constants" +import { WizardShell } from "@/components/groups/wizard-shell" +import { stepHref } from "./step-href" + +const FACULTY_ICONS: Record = { + architettura: FiPenTool, + design: FiFeather, + ingegneria: FiBox, +} + +export function FacultyStep() { + return ( + +
+ {FACULTIES.map((faculty) => ( + + ))} +
+
+ ) +} diff --git a/src/components/groups/groups-result.tsx b/src/components/groups/groups-result.tsx new file mode 100644 index 0000000..b6e0e98 --- /dev/null +++ b/src/components/groups/groups-result.tsx @@ -0,0 +1,65 @@ +import Link from "next/link" +import { notFound } from "next/navigation" +import { FiArrowLeft, FiX } from "react-icons/fi" +import { CardCourseGroup } from "@/components/card-course-group" +import { getCourse, getFaculty, getLevel } from "@/components/groups/constants" +import { stepHref } from "./step-href" + +// TODO: placeholder da cambiare +const FIRST_YEAR_GROUPS_PLACEHOLDER = Array.from({ length: 7 }, (_, i) => `Sezione P${i + 1}`) + +export function GroupsResult({ school, level, course }: { school: string; level: string; course: string }) { + const faculty = getFaculty(school) + const currentCourse = getCourse(school, level, course) + const currentLevel = getLevel(level) + if (!faculty || !currentCourse || !currentLevel) notFound() + + return ( +
+
+ + + +
+

{currentCourse.name}

+

+ Laurea {currentLevel.name} +

+
+ + + +
+ +
+ + +
+ +
+
+

+ Gruppi del Primo Anno +

+

+ {FIRST_YEAR_GROUPS_PLACEHOLDER.length} Gruppi +

+
+
+ {FIRST_YEAR_GROUPS_PLACEHOLDER.map((name) => ( + + ))} +
+
+
+ ) +} diff --git a/src/components/groups/level-step.tsx b/src/components/groups/level-step.tsx new file mode 100644 index 0000000..9104149 --- /dev/null +++ b/src/components/groups/level-step.tsx @@ -0,0 +1,30 @@ +import Link from "next/link" +import { notFound } from "next/navigation" +import { FiBook } from "react-icons/fi" +import { CardPathSelection } from "@/components/card-path-selection" +import { getFaculty, LEVELS } from "@/components/groups/constants" +import { WizardShell } from "@/components/groups/wizard-shell" +import { stepHref } from "./step-href" + +export function LevelStep({ school }: { school: string }) { + const faculty = getFaculty(school) + if (!faculty) notFound() + + return ( + +
+ {LEVELS.map((level) => ( + + + + ))} +
+
+ ) +} diff --git a/src/components/groups/step-href.ts b/src/components/groups/step-href.ts new file mode 100644 index 0000000..bcb6949 --- /dev/null +++ b/src/components/groups/step-href.ts @@ -0,0 +1,4 @@ +export function stepHref(params: { school?: string; level?: string; course?: string }) { + const segments = [params.school, params.level, params.course].filter(Boolean) + return ["/groups/didattica", ...segments].join("/") +} diff --git a/src/components/groups/types.ts b/src/components/groups/types.ts index 95beeec..d02e813 100644 --- a/src/components/groups/types.ts +++ b/src/components/groups/types.ts @@ -5,10 +5,7 @@ export type Faculty = { slug: string; name: string } export type Level = { slug: string; name: string } export type Course = { slug: string; name: string; location: Campus; language: Language } -export type WizardParams = { - school?: string - level?: string - course?: string +export type CourseSearchParams = { campus?: string lang?: string } diff --git a/src/components/groups/wizard-shell.tsx b/src/components/groups/wizard-shell.tsx index dd7cb74..1097b81 100644 --- a/src/components/groups/wizard-shell.tsx +++ b/src/components/groups/wizard-shell.tsx @@ -3,38 +3,53 @@ import { useRouter } from "next/navigation" import type { ReactNode } from "react" import { FiArrowLeft, FiX } from "react-icons/fi" +import { ButtonIcon } from "@/components/button-icon" import { Glass } from "@/components/glass" import { cn } from "@/lib/utils" -const STEPS = ["Facoltà", "Triennale/Magistrale", "Corso"] as const - -const iconButton = "grid size-10 shrink-0 place-items-center rounded-full bg-white/60" +const STEPS = ["Facoltà", "Triennale/​Magistrale", "Corso"] as const type WizardShellProps = { activeStep: number title: string caption?: string + captionPosition?: "above" | "below" + backHref?: string action?: ReactNode children: ReactNode } -export function WizardShell({ activeStep, title, caption, action, children }: WizardShellProps) { +export function WizardShell({ + activeStep, + title, + caption, + captionPosition = "below", + backHref, + action, + children, +}: WizardShellProps) { const router = useRouter() return ( -
- -
- +
+ +
+ (backHref ? router.replace(backHref) : router.back())} + /> -
    +
      {STEPS.map((label, index) => (
    1. @@ -43,16 +58,33 @@ export function WizardShell({ activeStep, title, caption, action, children }: Wi ))}
    - + router.push("/groups")} + />
-
+
-
- {caption &&

{caption}

} -

{title}

+
+ {captionPosition === "above" && caption && ( +

{caption}

+ )} +

+ {title} +

+ {captionPosition === "below" && caption && ( +

{caption}

+ )}
{action &&
{action}
}
diff --git a/src/components/home/group-search.tsx b/src/components/home/group-search.tsx index 53d3f41..5249fa1 100644 --- a/src/components/home/group-search.tsx +++ b/src/components/home/group-search.tsx @@ -37,8 +37,8 @@ export function GroupSearch() { } type="text" - placeholder="Find your group" - aria-label="Find your group" + placeholder="Corso, Facoltà, Interessi..." + aria-label="Corso, Facoltà, Interessi..." containerClassName="w-full" className="typo-body-medium" value={query} diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 644312d..172ae5f 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -16,6 +16,7 @@ const buttonVariants = cva( "bg-button-tertiary hover:bg-button-tertiary/90 text-text-accent-lightbg typo-label-large rounded-buttonsM", tertiaryBlur: "bg-blue-tertiary-blur hover:bg-blue-tertiary-blur/90 text-text-accent-lightbg typo-headline-small rounded-buttonsM", + glass: "bg-background-blur backdrop-blur-md rounded-buttonsL", outline: "border bg-white shadow-xs hover:bg-slate-100 hover:text-slate-900 dark:bg-slate-200/30 dark:border-slate-200 dark:hover:bg-slate-200/50 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:dark:bg-slate-800/30 dark:dark:border-slate-800 dark:dark:hover:bg-slate-800/50", link: "text-slate-900 underline-offset-4 underline dark:text-slate-50", diff --git a/src/styles/typography.css b/src/styles/typography.css index 82ac004..acfde33 100644 --- a/src/styles/typography.css +++ b/src/styles/typography.css @@ -64,6 +64,10 @@ @apply font-red-hat font-medium text-[0.6875rem]/[16px]; } +@utility typo-label-tiny { + @apply font-red-hat font-medium text-[0.59rem]/[15px]; +} + /* Title */ @utility typo-title-large { @apply font-poppins font-normal text-[1.375rem]/[28px]; @@ -76,3 +80,4 @@ @utility typo-title-small { @apply font-red-hat font-medium text-[0.875rem]/[20px]; } + From 06e28a81375fc7f62948c7c6027ec72e95491040 Mon Sep 17 00:00:00 2001 From: Bianca Date: Thu, 20 Aug 2026 00:05:22 +0200 Subject: [PATCH 5/9] feat: add ExtraGroups component and page for displaying additional groups --- src/app/groups/extra/page.tsx | 5 +++++ src/components/groups/extra-groups.tsx | 31 ++++++++++++++++++++++++++ src/components/groups/faculty-step.tsx | 7 +++++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/app/groups/extra/page.tsx create mode 100644 src/components/groups/extra-groups.tsx diff --git a/src/app/groups/extra/page.tsx b/src/app/groups/extra/page.tsx new file mode 100644 index 0000000..532abf0 --- /dev/null +++ b/src/app/groups/extra/page.tsx @@ -0,0 +1,5 @@ +import { ExtraGroups } from "@/components/groups/extra-groups" + +export default function ExtraGroupsPage() { + return +} diff --git a/src/components/groups/extra-groups.tsx b/src/components/groups/extra-groups.tsx new file mode 100644 index 0000000..08b7ecc --- /dev/null +++ b/src/components/groups/extra-groups.tsx @@ -0,0 +1,31 @@ +import Link from "next/link" +import { FiArrowLeft } from "react-icons/fi" +import { CardCourseGroup } from "@/components/card-course-group" + +// TODO: placeholder da cambiare +const EXTRA_GROUPS_PLACEHOLDER = ["Affitti", "Mercatino", "Eventi", "Hobby"] + +export function ExtraGroups() { + return ( +
+
+ + + +
+

Gruppi Extra

+
+
+ +
+ {EXTRA_GROUPS_PLACEHOLDER.map((name) => ( + + ))} +
+
+ ) +} diff --git a/src/components/groups/faculty-step.tsx b/src/components/groups/faculty-step.tsx index 74549a7..071ad1a 100644 --- a/src/components/groups/faculty-step.tsx +++ b/src/components/groups/faculty-step.tsx @@ -13,7 +13,12 @@ const FACULTY_ICONS: Record = { export function FacultyStep() { return ( - +
{FACULTIES.map((faculty) => ( Date: Thu, 20 Aug 2026 00:05:59 +0200 Subject: [PATCH 6/9] refactor: biome --- src/components/card-path-selection.tsx | 10 +++++++++- src/styles/typography.css | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/card-path-selection.tsx b/src/components/card-path-selection.tsx index 57c211d..41356b5 100644 --- a/src/components/card-path-selection.tsx +++ b/src/components/card-path-selection.tsx @@ -2,7 +2,15 @@ import type { IconType } from "react-icons" import { BsBook } from "react-icons/bs" import { Card, CardAction, CardContent } from "./ui/card" -export function CardPathSelection({ caption, icon: Icon = BsBook, className }: { caption: string; icon?: IconType; className?: string }) { +export function CardPathSelection({ + caption, + icon: Icon = BsBook, + className, +}: { + caption: string + icon?: IconType + className?: string +}) { return ( diff --git a/src/styles/typography.css b/src/styles/typography.css index acfde33..986e58e 100644 --- a/src/styles/typography.css +++ b/src/styles/typography.css @@ -80,4 +80,3 @@ @utility typo-title-small { @apply font-red-hat font-medium text-[0.875rem]/[20px]; } - From 3ca8966153d3476df6ca9aec38b30080f6c4e25b Mon Sep 17 00:00:00 2001 From: Bianca Date: Thu, 20 Aug 2026 01:20:38 +0200 Subject: [PATCH 7/9] fix: adjust padding in Groups and WizardShell components for better layout --- src/app/groups/page.tsx | 2 +- src/components/groups/groups-result.tsx | 2 +- src/components/groups/wizard-shell.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/groups/page.tsx b/src/app/groups/page.tsx index 5ee5fbe..941e5be 100644 --- a/src/app/groups/page.tsx +++ b/src/app/groups/page.tsx @@ -22,7 +22,7 @@ const groups = [ export default function Home() { return (
-
+

Groups diff --git a/src/components/groups/groups-result.tsx b/src/components/groups/groups-result.tsx index b6e0e98..c4ef473 100644 --- a/src/components/groups/groups-result.tsx +++ b/src/components/groups/groups-result.tsx @@ -15,7 +15,7 @@ export function GroupsResult({ school, level, course }: { school: string; level: if (!faculty || !currentCourse || !currentLevel) notFound() return ( -
+
+
Date: Fri, 28 Aug 2026 23:23:14 +0200 Subject: [PATCH 8/9] feat: refactor faculty to school terminology and implement SchoolStep component --- src/app/groups/didattica/page.tsx | 4 ++-- src/components/groups/constants.ts | 20 +++++++++---------- src/components/groups/course-step.tsx | 16 +++++++-------- src/components/groups/groups-result.tsx | 14 ++++++------- src/components/groups/level-step.tsx | 12 +++++------ .../{faculty-step.tsx => school-step.tsx} | 18 ++++++++--------- src/components/groups/types.ts | 2 +- src/components/groups/wizard-shell.tsx | 2 +- src/components/home/group-search.tsx | 4 ++-- 9 files changed, 46 insertions(+), 46 deletions(-) rename src/components/groups/{faculty-step.tsx => school-step.tsx} (61%) diff --git a/src/app/groups/didattica/page.tsx b/src/app/groups/didattica/page.tsx index 7f1a91a..e944d36 100644 --- a/src/app/groups/didattica/page.tsx +++ b/src/app/groups/didattica/page.tsx @@ -1,5 +1,5 @@ -import { FacultyStep } from "@/components/groups/faculty-step" +import { SchoolStep } from "@/components/groups/school-step" export default function DidatticaWizard() { - return + return } diff --git a/src/components/groups/constants.ts b/src/components/groups/constants.ts index 7fac9fe..38f8ad6 100644 --- a/src/components/groups/constants.ts +++ b/src/components/groups/constants.ts @@ -1,6 +1,6 @@ -import type { Course, Faculty, Level } from "@/components/groups/types" +import type { Course, Level, School } from "@/components/groups/types" -export const FACULTIES: Faculty[] = [ +export const SCHOOLS: School[] = [ { slug: "architettura", name: "Scuola di Architettura" }, { slug: "design", name: "Scuola di Design" }, { slug: "ingegneria", name: "Scuole di Ingegneria" }, @@ -19,24 +19,24 @@ export const COURSES: Record = { ], } -export function getFaculty(slug: string) { - return FACULTIES.find((faculty) => faculty.slug === slug) +export function getSchool(slug: string) { + return SCHOOLS.find((school) => school.slug === slug) } export function getLevel(slug: string) { return LEVELS.find((level) => level.slug === slug) } -export function getCourses(faculty: string, level: string) { - return COURSES[`${faculty}/${level}`] ?? [] +export function getCourses(school: string, level: string) { + return COURSES[`${school}/${level}`] ?? [] } -export function getCourse(faculty: string, level: string, slug: string) { - return getCourses(faculty, level).find((course) => course.slug === slug) +export function getCourse(school: string, level: string, slug: string) { + return getCourses(school, level).find((course) => course.slug === slug) } -export function getCourseFilters(faculty: string, level: string) { - const courses = getCourses(faculty, level) +export function getCourseFilters(school: string, level: string) { + const courses = getCourses(school, level) return { campuses: [...new Set(courses.map((course) => course.location))], languages: [...new Set(courses.map((course) => course.language))], diff --git a/src/components/groups/course-step.tsx b/src/components/groups/course-step.tsx index 296a26a..8e66132 100644 --- a/src/components/groups/course-step.tsx +++ b/src/components/groups/course-step.tsx @@ -2,13 +2,13 @@ import Link from "next/link" import { notFound } from "next/navigation" import { FiChevronRight } from "react-icons/fi" import { CardCourse } from "@/components/card-course" -import { getCourseFilters, getCourses, getFaculty, getLevel } from "@/components/groups/constants" +import { getCourseFilters, getCourses, getLevel, getSchool } from "@/components/groups/constants" import { CourseFilters } from "@/components/groups/course-filters" import { WizardShell } from "@/components/groups/wizard-shell" import { stepHref } from "./step-href" export function CourseStep({ - school, + school: schoolSlug, level, campus, lang, @@ -18,12 +18,12 @@ export function CourseStep({ campus?: string lang?: string }) { - const faculty = getFaculty(school) + const school = getSchool(schoolSlug) const currentLevel = getLevel(level) - if (!faculty || !currentLevel) notFound() + if (!school || !currentLevel) notFound() - const { campuses, languages } = getCourseFilters(school, level) - const courses = getCourses(school, level).filter( + const { campuses, languages } = getCourseFilters(schoolSlug, level) + const courses = getCourses(schoolSlug, level).filter( (course) => (!campus || course.location === campus) && (!lang || course.language === lang) ) @@ -33,7 +33,7 @@ export function CourseStep({ title="Quale corso segui?" caption={`Perfetto, cerchiamo tra i corsi della ${currentLevel.name.toLowerCase()}!`} captionPosition="above" - backHref={stepHref({ school })} + backHref={stepHref({ school: schoolSlug })} action={} >
@@ -41,7 +41,7 @@ export function CourseStep({

Nessun corso corrisponde ai filtri.

)} {courses.map((course) => ( - + `Sezione P${i + 1}`) -export function GroupsResult({ school, level, course }: { school: string; level: string; course: string }) { - const faculty = getFaculty(school) - const currentCourse = getCourse(school, level, course) +export function GroupsResult({ school: schoolSlug, level, course }: { school: string; level: string; course: string }) { + const school = getSchool(schoolSlug) + const currentCourse = getCourse(schoolSlug, level, course) const currentLevel = getLevel(level) - if (!faculty || !currentCourse || !currentLevel) notFound() + if (!school || !currentCourse || !currentLevel) notFound() return (
- +
diff --git a/src/components/groups/level-step.tsx b/src/components/groups/level-step.tsx index 9104149..d9c0be4 100644 --- a/src/components/groups/level-step.tsx +++ b/src/components/groups/level-step.tsx @@ -2,25 +2,25 @@ import Link from "next/link" import { notFound } from "next/navigation" import { FiBook } from "react-icons/fi" import { CardPathSelection } from "@/components/card-path-selection" -import { getFaculty, LEVELS } from "@/components/groups/constants" +import { getSchool, LEVELS } from "@/components/groups/constants" import { WizardShell } from "@/components/groups/wizard-shell" import { stepHref } from "./step-href" -export function LevelStep({ school }: { school: string }) { - const faculty = getFaculty(school) - if (!faculty) notFound() +export function LevelStep({ school: schoolSlug }: { school: string }) { + const school = getSchool(schoolSlug) + if (!school) notFound() return (
{LEVELS.map((level) => ( - + ))} diff --git a/src/components/groups/faculty-step.tsx b/src/components/groups/school-step.tsx similarity index 61% rename from src/components/groups/faculty-step.tsx rename to src/components/groups/school-step.tsx index 071ad1a..289ec3a 100644 --- a/src/components/groups/faculty-step.tsx +++ b/src/components/groups/school-step.tsx @@ -1,31 +1,31 @@ import type { IconType } from "react-icons" import { FiBox, FiFeather, FiPenTool } from "react-icons/fi" import { CardIcon } from "@/components/card-icon" -import { FACULTIES } from "@/components/groups/constants" +import { SCHOOLS } from "@/components/groups/constants" import { WizardShell } from "@/components/groups/wizard-shell" import { stepHref } from "./step-href" -const FACULTY_ICONS: Record = { +const SCHOOL_ICONS: Record = { architettura: FiPenTool, design: FiFeather, ingegneria: FiBox, } -export function FacultyStep() { +export function SchoolStep() { return (
- {FACULTIES.map((faculty) => ( + {SCHOOLS.map((school) => ( ))} diff --git a/src/components/groups/types.ts b/src/components/groups/types.ts index d02e813..184edfb 100644 --- a/src/components/groups/types.ts +++ b/src/components/groups/types.ts @@ -1,7 +1,7 @@ export type Campus = "Milano Leonardo" | "Milano Bovisa" | "Cremona" | "Lecco" | "Mantova" | "Piacenza" | "Xi'an" export type Language = "ITA" | "ENG" -export type Faculty = { slug: string; name: string } +export type School = { slug: string; name: string } export type Level = { slug: string; name: string } export type Course = { slug: string; name: string; location: Campus; language: Language } diff --git a/src/components/groups/wizard-shell.tsx b/src/components/groups/wizard-shell.tsx index b92432c..c0a7e75 100644 --- a/src/components/groups/wizard-shell.tsx +++ b/src/components/groups/wizard-shell.tsx @@ -7,7 +7,7 @@ import { ButtonIcon } from "@/components/button-icon" import { Glass } from "@/components/glass" import { cn } from "@/lib/utils" -const STEPS = ["Facoltà", "Triennale/​Magistrale", "Corso"] as const +const STEPS = ["Scuola", "Triennale/​Magistrale", "Corso"] as const type WizardShellProps = { activeStep: number diff --git a/src/components/home/group-search.tsx b/src/components/home/group-search.tsx index 5249fa1..a8f21f9 100644 --- a/src/components/home/group-search.tsx +++ b/src/components/home/group-search.tsx @@ -37,8 +37,8 @@ export function GroupSearch() { } type="text" - placeholder="Corso, Facoltà, Interessi..." - aria-label="Corso, Facoltà, Interessi..." + placeholder="Corso, Scuola, Interessi..." + aria-label="Corso, Scuola, Interessi..." containerClassName="w-full" className="typo-body-medium" value={query} From 509a7c704955f0b9bc7ee4e204a43ad7bf47bf6d Mon Sep 17 00:00:00 2001 From: Bianca Date: Sat, 29 Aug 2026 00:47:50 +0200 Subject: [PATCH 9/9] refactor: update import paths for stepHref utility across group components --- src/components/groups/course-step.tsx | 2 +- src/components/groups/groups-result.tsx | 2 +- src/components/groups/level-step.tsx | 2 +- src/components/groups/school-step.tsx | 2 +- src/{components/groups => utils}/step-href.ts | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename src/{components/groups => utils}/step-href.ts (100%) diff --git a/src/components/groups/course-step.tsx b/src/components/groups/course-step.tsx index 8e66132..7f4df44 100644 --- a/src/components/groups/course-step.tsx +++ b/src/components/groups/course-step.tsx @@ -5,7 +5,7 @@ import { CardCourse } from "@/components/card-course" import { getCourseFilters, getCourses, getLevel, getSchool } from "@/components/groups/constants" import { CourseFilters } from "@/components/groups/course-filters" import { WizardShell } from "@/components/groups/wizard-shell" -import { stepHref } from "./step-href" +import { stepHref } from "../../utils/step-href" export function CourseStep({ school: schoolSlug, diff --git a/src/components/groups/groups-result.tsx b/src/components/groups/groups-result.tsx index c2844df..984c248 100644 --- a/src/components/groups/groups-result.tsx +++ b/src/components/groups/groups-result.tsx @@ -3,7 +3,7 @@ import { notFound } from "next/navigation" import { FiArrowLeft, FiX } from "react-icons/fi" import { CardCourseGroup } from "@/components/card-course-group" import { getCourse, getLevel, getSchool } from "@/components/groups/constants" -import { stepHref } from "./step-href" +import { stepHref } from "../../utils/step-href" // TODO: placeholder da cambiare const FIRST_YEAR_GROUPS_PLACEHOLDER = Array.from({ length: 7 }, (_, i) => `Sezione P${i + 1}`) diff --git a/src/components/groups/level-step.tsx b/src/components/groups/level-step.tsx index d9c0be4..28d96d8 100644 --- a/src/components/groups/level-step.tsx +++ b/src/components/groups/level-step.tsx @@ -4,7 +4,7 @@ import { FiBook } from "react-icons/fi" import { CardPathSelection } from "@/components/card-path-selection" import { getSchool, LEVELS } from "@/components/groups/constants" import { WizardShell } from "@/components/groups/wizard-shell" -import { stepHref } from "./step-href" +import { stepHref } from "../../utils/step-href" export function LevelStep({ school: schoolSlug }: { school: string }) { const school = getSchool(schoolSlug) diff --git a/src/components/groups/school-step.tsx b/src/components/groups/school-step.tsx index 289ec3a..4c053fb 100644 --- a/src/components/groups/school-step.tsx +++ b/src/components/groups/school-step.tsx @@ -3,7 +3,7 @@ import { FiBox, FiFeather, FiPenTool } from "react-icons/fi" import { CardIcon } from "@/components/card-icon" import { SCHOOLS } from "@/components/groups/constants" import { WizardShell } from "@/components/groups/wizard-shell" -import { stepHref } from "./step-href" +import { stepHref } from "../../utils/step-href" const SCHOOL_ICONS: Record = { architettura: FiPenTool, diff --git a/src/components/groups/step-href.ts b/src/utils/step-href.ts similarity index 100% rename from src/components/groups/step-href.ts rename to src/utils/step-href.ts