Skip to content

Commit

Permalink
Merge pull request #44 from zainsci/main
Browse files Browse the repository at this point in the history
feat(app): Migrate down to Pages Router
  • Loading branch information
Hussseinkizz authored Jan 19, 2024
2 parents 032be32 + 5bfe0d5 commit 7014e8e
Show file tree
Hide file tree
Showing 34 changed files with 991 additions and 899 deletions.
85 changes: 0 additions & 85 deletions app/about/page.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions app/blog/[slug]/page.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions app/events/[slug]/page.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions app/events/not-found.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions app/jobs/page.tsx

This file was deleted.

45 changes: 0 additions & 45 deletions app/layout.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions app/page.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions app/sponsors/page.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions app/team/page.tsx

This file was deleted.

30 changes: 15 additions & 15 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "@/styles/globals.css",
"baseColor": "gray",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "@/styles/globals.css",
"baseColor": "gray",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
4 changes: 0 additions & 4 deletions components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export default function Footer() {
</div>
<div className="flex-1 hidden md:flex flex-col items-end text-right">
<ul className="space-y-2">
<<<<<<< HEAD
{["About", "Meetups", "Blog", "Gallery", "Sponsors"].map(
=======
{["About", "Events", "Blog", "Gallery", "Sponsors"].map(
>>>>>>> 46d9fd6 (Meetups changed events in the footer)
(link: string) => (
<li>
<Link href={"/" + link.toLowerCase()}>
Expand Down
9 changes: 3 additions & 6 deletions components/home/Blog.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import Link from "next/link"
import Image from "next/image"

import { Post } from "@/lib/types"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardFooter } from "@/components/ui/card"
import Image from "next/image"
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"
import { getSortedPostsData } from "@/lib/posts"
import { Post } from "@/lib/types"

export default function Blog() {
let blogPosts: Post[] = getSortedPostsData("blog", 3)

export default function Blog({ blogPosts = [] }: { blogPosts?: Post[] }) {
return (
<section className="w-full my-12">
<h1 className="w-full text-center font-bold text-5xl mb-10">Blog</h1>
Expand Down
9 changes: 4 additions & 5 deletions components/home/Meetups.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Link from "next/link"

import { Button } from "@/components/ui/button"
import { Card, CardContent, CardFooter } from "@/components/ui/card"
import { getSortedPostsData } from "@/lib/posts"
import { Post } from "@/lib/types"
import { Card, CardContent, CardFooter } from "@/components/ui/card"
import { Button } from "@/components/ui/button"

export default function Meetups() {
const eventsList: Post[] = getSortedPostsData("events", 3)
export default function Meetups({ eventsList = [] }: { eventsList: Post[] }) {
console.log("eventsList", eventsList)

return (
<section className="w-full my-12">
Expand Down
42 changes: 42 additions & 0 deletions components/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import Footer from "@/components/footer"
import TopNavigationBar from "@/components/navigation/TopNavigationBar"
import { ThemeProvider } from "@/components/ui/theme-provider"
import { Metadata } from "next"
import { Ubuntu } from "next/font/google"
import Head from "next/head"

const inter = Ubuntu({ weight: ["400", "700"], subsets: ["cyrillic"] })

export default function RootLayout({
children,
title,
}: {
children: React.ReactNode
title: string
}) {
return (
<>
<Head>
<title>JavaScript Kampala | {title}</title>
</Head>
<div
className={`${inter.className} w-screen min-h-screen overflow-x-hidden`}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<TopNavigationBar />

<main className="container max-w-5xl mx-auto py-20 flex flex-col">
{children}
</main>

<Footer />
</ThemeProvider>
</div>
</>
)
}
Loading

0 comments on commit 7014e8e

Please sign in to comment.