Skip to content

Commit

Permalink
navigation config update
Browse files Browse the repository at this point in the history
  • Loading branch information
Neha committed Jun 14, 2024
1 parent 397bd6b commit 93fc2d7
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 36 deletions.
8 changes: 4 additions & 4 deletions app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SectionHeader from "@/components/SectionHeader";
import Workshop from "@/components/Workshop";
import { buttonVariants } from "@/components/Button";
import { cn } from "@/lib/utils";
import { MARKETING } from "@/config/marketing";
import { HOMEPAGE } from "@/config/home";
import SignupForMeetupCard from "@/components/SignupForMeetupCard";

export default async function page() {
Expand All @@ -13,7 +13,7 @@ export default async function page() {
<div className="container py-4">
<div className="max-w-2xl justify-between lg:flex lg:max-w-full lg:items-center gap-x-20">
<Workshop
workshopData={MARKETING.WorkshopData}
workshopData={HOMEPAGE.WorkshopData}
className={"w-full lg:w-1/2 max-w-2xl lg:shrink-0"}
/>

Expand Down Expand Up @@ -57,7 +57,7 @@ export default async function page() {
<div className="container py-16 space-y-16">
<SectionHeader header="Our Achivements" className="w-min mx-auto" />
<dl className="grid grid-cols-1 gap-x-8 gap-y-16 md:grid-cols-2 lg:grid-cols-4">
{MARKETING.Achievements.map((achievement) => {
{HOMEPAGE.Achievements.map((achievement) => {
return (
<div key={achievement.title} className="flex flex-col">
<dt className="text-xl xl:text-2xl text-center font-semibold">
Expand Down Expand Up @@ -89,7 +89,7 @@ export default async function page() {
<div className="container py-16 space-y-16 flex flex-col justify-center items-center">
<SectionHeader header="Previous talks" className="w-min" />
<div className="carousel carousel-center max-w-full flex flex-wrap justify-between gap-7 xl:gap-8 py-5">
{MARKETING.PreviousTalks.map((previousTalk, index) => {
{HOMEPAGE.PreviousTalks.map((previousTalk, index) => {
return (
<div
key={`previousTalk.title + ${index}`}
Expand Down
4 changes: 2 additions & 2 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { MainNav } from "@/components/navigation/MainNav";
import { MARKETING } from "@/config/marketing";
import { NAVIGATION } from "@/config/navigation";

export function Header() {
return (
<header className="container z-40 bg-background">
<div className="flex h-32 items-center py-6">
<MainNav items={MARKETING.Navigation} />
<MainNav items={NAVIGATION.Navigation} />
</div>
</header>
);
Expand Down
30 changes: 2 additions & 28 deletions config/marketing.tsx → config/home.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
import { MarketingData } from "@/types";
import { Home } from "@/types";
import speakerImage from "public/assets/hero_image_guest_v1.png";

export const MARKETING: MarketingData = {
Navigation: [
{
title: "Home",
href: "/",
},
{
title: "Meetups",
href: "/meetups",
},
{
title: "Jobs",
href: "/jobs",
},
{
title: "Speakers",
href: "/speakers",
},
{
title: "Collaboration",
href: "/collaboration",
},
{
title: "About",
href: "/about",
},
],
export const HOMEPAGE: Home = {
Achievements: [
{
title: "10,000+ Members",
Expand Down
30 changes: 30 additions & 0 deletions config/navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Navigation } from "@/types";

export const NAVIGATION: Navigation = {
Navigation: [
{
title: "Home",
href: "/",
},
{
title: "Meetups",
href: "/meetups",
},
{
title: "Jobs",
href: "/jobs",
},
{
title: "Speakers",
href: "/speakers",
},
{
title: "Collaboration",
href: "/collaboration",
},
{
title: "About",
href: "/about",
},
]
};
7 changes: 5 additions & 2 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ export interface WorkShopData {
workshopDate: string;
}

export interface MarketingData {
Navigation: NavItem[];
export interface Home {
Achievements: AchievementItem[];
PreviousTalks: TalkItem[];
WorkshopData: WorkShopData;
}

export interface Navigation {
Navigation: NavItem[];
}
export interface FooterData {
QuickLinks: FooterItem[];
FollowUs: FooterItem[];
Expand Down

0 comments on commit 93fc2d7

Please sign in to comment.