diff --git a/app/[id]/page.tsx b/app/[id]/page.tsx index 0142098..165be85 100644 --- a/app/[id]/page.tsx +++ b/app/[id]/page.tsx @@ -4,8 +4,15 @@ import { app } from "@/lib/database" import { getStorage, ref, getDownloadURL } from "firebase/storage" import Image from "next/image" import Link from "next/link" +import { notFound } from "next/navigation" export default async function Page({ params }: { params: { id: string } }) { + const stickerImage = await getImage(params.id).catch(() => { + console.error("Image not found") + }) + + if (!stickerImage) return notFound() + return (

@@ -13,7 +20,7 @@ export default async function Page({ params }: { params: { id: string } }) {

+
+

+ Couldn't find your page +

+

+ We searched everywhere but couldn't find the page you were + looking for. +
+
+ If you encountered this page by a bug, please report it to me, the + creator of it, on X:{" "} + + @flornkm + +

+ + Return Home + +
+
+ ) +} diff --git a/components/Dialog.tsx b/components/Dialog.tsx index b848022..a16bcfe 100644 --- a/components/Dialog.tsx +++ b/components/Dialog.tsx @@ -26,7 +26,7 @@ export default function Dialog(props: { children: React.ReactNode }) { }} className={ "px-6 py-4 bg-white border border-zinc-300 rounded-2xl pointer-events-auto w-full max-w-lg max-h-[70vh] overflow-y-scroll min-h-64 " + - (animateIn ? "animate-fade-in-down" : "animate-fade-out-down") + (animateIn ? "animate-scale-in" : "animate-scale-out") } > {props.children} diff --git a/components/Icons.tsx b/components/Icons.tsx index c8e69e1..137837b 100644 --- a/components/Icons.tsx +++ b/components/Icons.tsx @@ -109,6 +109,35 @@ export function X(props: { size?: number; className?: string }) { ) } +export function Information(props: { size?: number; className?: string }) { + return ( + + + + + + ) +} + export function ArrowLeft(props: { size?: number; className?: string }) { return ( {!hide && ( -
+
{props.children}
)} @@ -47,6 +48,7 @@ export const showNotification = (message: string, timer: number = 5000) => { const notification = ( +

{message}

) diff --git a/tailwind.config.ts b/tailwind.config.ts index 7f1bbc2..3f499ad 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -67,6 +67,26 @@ const config: Config = { transform: "scale(1) rotate(-3deg)", }, }, + "scale-in": { + "0%": { + opacity: "0", + transform: "scale(0.9)", + }, + "100%": { + opacity: "1", + transform: "scale(1)", + }, + }, + "scale-out": { + "0%": { + opacity: "1", + transform: "scale(1)", + }, + "100%": { + opacity: "0", + transform: "scale(0.9)", + }, + }, }, animation: { "fade-in-down": "fade-in-down 0.5s ease-out", @@ -74,6 +94,8 @@ const config: Config = { "fade-out-down": "fade-out-down 0.5s ease-out", "fade-out-up": "fade-out-up 0.5s ease-out", "fall-in": "fall-in 1.5s ease-out", + "scale-in": "scale-in 0.3s ease-in-out", + "scale-out": "scale-out 0.3s ease-in-out", }, }, },