feat: add UI component files and navigation structure

Added various UI components and navigation elements including:
- Section cards and selection components
- Social icon SVGs with horizontal/vertical text variants
- Table, tabs, and toggle components
- Site header and sidebar components
- Tooltip and unauthorized page
- Project configuration files (tsconfig.json)
- Route handlers for health checks
- Utility and hook functions for mobile responsiveness
This commit is contained in:
joshuasalcedo-dev 2025-04-03 10:31:23 +08:00
parent a620991529
commit f691f5d570
63 changed files with 7956 additions and 2854 deletions

28
middleware.ts Normal file
View file

@ -0,0 +1,28 @@
import { NextRequest, NextResponse } from "next/server"
export function middleware(request: NextRequest) {
// Check if environment is production and if the app is ready
const isProd = process.env.NODE_ENV === "production"
const isReady = process.env.READY === "true"
// If in production and not ready, redirect to under-development
if (isProd && !isReady) {
return NextResponse.redirect(new URL("/under-development", request.url))
}
// Original redirect for /about paths
if (request.nextUrl.pathname.startsWith("/about")) {
return NextResponse.redirect(new URL("/home", request.url))
}
if (process.env.NODE_ENV === "development") {
// return NextResponse.redirect(new URL("/showcase", request.url))
}
return NextResponse.next()
}
export const config = {
// Match about paths and the root path to check readiness
matcher: ["/about/:path*", "/((?!under-development|api|_next/static|favicon.ico).*)"],
}