Skip to content
Snippets Groups Projects
Commit b32df2a6 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

cleanup

parent d889a9f9
No related branches found
No related tags found
1 merge request!46Search
Pipeline #39948 passed
"use client"
import { Icons } from "@/components/icons"
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import Link from "next/link"
export default function Error({
error,
reset,
}: {
error: Error
reset: () => void
}) {
return (
<div className="flex h-[80vh] w-full flex-col items-center justify-center">
<Alert className="my-6 w-[40%]">
<Icons.terminal className="h-4 w-4" />
<AlertTitle>{error.name}</AlertTitle>
<AlertDescription>{error.message}</AlertDescription>
</Alert>
<div className="mt-5 flex items-center">
<Button onClick={() => reset()} className="ml-3">
Try again
</Button>
</div>
<div className="mt-5 flex items-center">
<Link href="/home">
<Button size="lg">
Back to Home Page
</Button>
</Link>
</div>
</div>
)
}
\ No newline at end of file
......@@ -3,13 +3,77 @@ import './globals.css'
import { ThemeProvider } from '@/components/ui/theme-provider'
import { Toaster } from '@/components/ui/toaster'
import { siteConfig } from "@/lib/config/site"
import Providers from '@/lib/react-query/provider'
const inter = Inter({ subsets: ['latin'] })
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: {
default: siteConfig.name,
template: `%s | ${siteConfig.name}`,
},
description: siteConfig.description,
keywords: [
"Next.js",
"React",
"Tailwind CSS",
"Server Components",
"Radix UI",
"TypeScript",
"ESLint",
"Prisma ORM",
"PostgreSQL",
"Vercel",
"Jest",
"IGDB",
],
authors: [
{
name: "Yusuf Akgül",
},
{
name: "Caner Ilaslan",
},
{
name: "David Jakszta",
},
{
name: "Omar Kasbah",
},
{
name: "Serdar Dorak",
},
{
name: "Valeria Luft",
},
],
creator: "The Golden Order Studio",
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
],
openGraph: {
type: "website",
locale: "en_US",
url: siteConfig.url,
title: siteConfig.name,
description: siteConfig.description,
siteName: siteConfig.name,
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
images: [`${siteConfig.url}/og.jpg`],
creator: "@shadcn",
},
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
apple: "/apple-touch-icon.png",
},
manifest: `${siteConfig.url}/site.webmanifest`,
}
export default function RootLayout({
......
import { Button } from "@/components/ui/button"
import Link from "next/link"
export default function notFound() {
return (
<div className="flex h-[50vh] w-full flex-col items-center justify-center space-y-6">
<p className="text-xl text-muted-foreground">Page not found</p>
<p className="text-muted-foreground">Could not find requested resource</p>
<Link href="/home">
<Button size="lg">
Back to Home Page
</Button>
</Link>
</div>
)
}
\ No newline at end of file
......@@ -33,6 +33,7 @@ import {
Settings,
SunMedium,
SwitchCamera,
TerminalIcon,
Trash,
User,
Users,
......@@ -91,6 +92,7 @@ export const Icons = {
website: Link2, // Website Button
calendar: CalendarRange, // Calendar Button
camera: SwitchCamera, // Change Image Button
terminal: TerminalIcon, // Terminal Icon
post: FileText,
page: File,
media: Image,
......
......@@ -6,9 +6,9 @@ import { Connect } from "./connect"
export const ProfileSideContent = async ({ user }: { user: IUser }) => {
const session = await getCurrentUser()
const arrayOfUserMedia = user.gweets.slice(0, 4)
const arrayOfUserMedia = user?.gweets.slice(0, 4)
.flatMap((gweet) => gweet.media.slice(0, 4).map((media) => ({ id: gweet.id, url: media.url })))
.slice(0, 4)
.slice(0, 4) ?? []
return (
<div className="space-y-6">
......
export const UserNotFound = () => {
return (
<div className="">
<h1>This account does not exist.</h1>
<p>Try searching for another.</p>
<div className="flex flex-col items-center p-6 space-y-3">
<h1 className="text-tertiary text-center">This account does not exist.</h1>
<h1 className="text-tertiary text-center">Try searching for another.</h1>
</div>
)
}
\ No newline at end of file
......@@ -3,7 +3,7 @@ import { SiteConfig } from "@/types"
export const siteConfig: SiteConfig = {
name: "GameUnity",
description:
"Your game tracker to finally get an overview of your games built using the new router, server components and everything new in Next.js 13.",
url: "",
"Your social media for game tracking needs, so you can finally get an overview of your games. Built using the new router, server components and everything new in Next.js 13.",
url: "https://gameunity.vercel.app/",
ogImage: "",
}
\ No newline at end of file
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment