From 8f5abed48ddf3e51675fde1e6742705ae1eed7f9 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Mon, 16 Feb 2026 11:38:38 +0100 Subject: [PATCH] Updates --- components/lib/form/FileUpload.tsx | 30 ++++++++-------- public/robots.txt | 11 ++++++ public/sitemap.xml | 58 ++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml diff --git a/components/lib/form/FileUpload.tsx b/components/lib/form/FileUpload.tsx index 163cc0c..01a34ee 100644 --- a/components/lib/form/FileUpload.tsx +++ b/components/lib/form/FileUpload.tsx @@ -24,12 +24,12 @@ type ImageUploadProps = DetailedHTMLProps< onChangeHandler?: ( fileData: FileInputToBase64FunctionReturn | undefined, inputRef?: React.RefObject, - utils?: FileInputUtils + utils?: FileInputUtils, ) => any; changeHandler?: ( fileData: FileInputToBase64FunctionReturn | undefined, inputRef?: React.RefObject, - utils?: FileInputUtils + utils?: FileInputUtils, ) => any; onClear?: () => void; fileInputProps?: DetailedHTMLProps< @@ -95,7 +95,7 @@ export default function FileUpload({ FileInputToBase64FunctionReturn | undefined >(existingFile); const [fileUrl, setFileUrl] = React.useState( - existingFileUrl + existingFileUrl, ); const [fileDraggedOver, setFileDraggedOver] = React.useState(false); @@ -168,11 +168,11 @@ export default function FileUpload({ onChangeHandler?.( res, inputRef, - fileInputUtils + fileInputUtils, ); changeHandler?.(res, inputRef, fileInputUtils); fileInputProps?.onChange?.(e); - } + }, ); } }} @@ -191,7 +191,7 @@ export default function FileUpload({ className={twMerge( "w-full relative h-full items-center justify-center overflow-hidden", "pb-10", - previewImageWrapperProps?.className + previewImageWrapperProps?.className, )} > @@ -222,7 +222,7 @@ export default function FileUpload({ variant="ghost" className={twMerge( "absolute p-2 top-2 right-2 z-20 bg-background-light dark:bg-background-dark", - "hover:bg-white dark:hover:bg-black" + "hover:bg-white dark:hover:bg-black", )} onClick={(e) => { clearFileInput(); @@ -283,7 +283,7 @@ export default function FileUpload({ variant="ghost" className={twMerge( "absolute p-2 top-2 right-2 z-20 bg-white dark:bg-black", - "hover:bg-white dark:hover:bg-black" + "hover:bg-white dark:hover:bg-black", )} onClick={(e) => { setFile(undefined); @@ -303,7 +303,7 @@ export default function FileUpload({ "w-full h-full cursor-pointer hover:bg-slate-100/50 dark:hover:bg-white/5", "border-dashed border-2", fileDraggedOver ? "bg-slate-100 dark:bg-white/10" : "", - placeHolderWrapper?.className + placeHolderWrapper?.className, )} onClick={(e) => { inputRef.current?.click(); @@ -341,14 +341,14 @@ export default function FileUpload({ externalSetFile?.(res); onChangeHandler?.(res); changeHandler?.(res); - } + }, ); }} {...placeHolderWrapper} >
@@ -382,10 +382,10 @@ export default function FileUpload({ if (e.key == "Enter") { if (tempFileURLRef.current) { setFileUrl( - tempFileURLRef.current + tempFileURLRef.current, ); externalSetFileURL( - tempFileURLRef.current + tempFileURLRef.current, ); } } @@ -401,10 +401,10 @@ export default function FileUpload({ if (tempFileURLRef.current) { setFileUrl( - tempFileURLRef.current + tempFileURLRef.current, ); externalSetFileURL( - tempFileURLRef.current + tempFileURLRef.current, ); } }} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..3e6c075 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,11 @@ +# https://www.tben.me robots.txt + +User-agent: * +Allow: / + +# Sitemaps +Sitemap: https://www.tben.me/sitemap.xml + +# Optional: disallow common non-content paths (uncomment if needed) +# Disallow: /api/ +# Disallow: /_next/ diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..36ee4dd --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,58 @@ + + + + + https://www.tben.me/ + weekly + 1.0 + + + + + https://www.tben.me/about + monthly + 0.7 + + + https://www.tben.me/skills + monthly + 0.7 + + + https://www.tben.me/work + monthly + 0.8 + + + https://www.tben.me/blog + weekly + 0.8 + + + https://www.tben.me/contact + monthly + 0.6 + + + + + https://www.tben.me/blog/nginx-reverse-proxy-caching-rate-limiting-static-files + monthly + 0.6 + + + https://www.tben.me/blog/solving-the-database-hassle + monthly + 0.5 + + + https://www.tben.me/blog/find-your-perfect-framework + monthly + 0.5 + + + https://www.tben.me/blog/choosing-your-tech-stack + monthly + 0.5 + +