Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit a7a92eb

Browse files
committed
chore: lint
1 parent 9378f6a commit a7a92eb

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

apps/docs/src/app/community/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export default async function CommunityPage() {
8686
},
8787
{
8888
name: "@better-auth-kit/profile-image",
89-
description: "Upload, delete, and manage profile pictures for your users.",
89+
description:
90+
"Upload, delete, and manage profile pictures for your users.",
9091
downloads: 0,
9192
version: "0",
9293
docs: "https://better-auth-kit.com/docs/plugins/profile-image",

apps/docs/src/app/test/upload-img/page.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Page() {
2323
console.log("Uploading", image);
2424

2525
const blob = await compressImage(image);
26-
if(!blob) return;
26+
if (!blob) return;
2727

2828
const res = await authClient.profileImage.upload({
2929
image: blob,
@@ -67,8 +67,6 @@ export default function Page() {
6767
);
6868
}
6969

70-
71-
7270
function UploadProfileImage() {
7371
const [image, setImage] = useState<File | null>(null);
7472

@@ -82,20 +80,19 @@ function UploadProfileImage() {
8280
if (!image) return;
8381

8482
const blob = await compressImage(image);
85-
if(!blob) return;
83+
if (!blob) return;
8684

8785
const { data, error } = await authClient.profileImage.upload({
88-
image: blob
86+
image: blob,
8987
});
9088

91-
if(data){
89+
if (data) {
9290
console.log(`Successfully uploaded image to ${data.image.url}`);
93-
}else{
91+
} else {
9492
console.error(`Something went wrong:`, error);
9593
}
9694
};
9795

98-
9996
return (
10097
<div>
10198
<Label htmlFor="image-upload">Upload Image</Label>

apps/docs/src/lib/auth.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { betterAuth } from "better-auth";
22
import { nextCookies } from "better-auth/next-js";
33
import Database from "better-sqlite3";
4-
import { profileImage, UploadThingProvider } from "@better-auth-kit/profile-image";
4+
import {
5+
profileImage,
6+
UploadThingProvider,
7+
} from "@better-auth-kit/profile-image";
58
import { UTApi } from "uploadthing/server";
69
import "dotenv/config";
710

packages/plugins/profile-image/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export interface ProfileImageOptions {
7777

7878
/**
7979
* Optional array of trusted image origins. If undefined, any origin is trusted.
80-
*
80+
*
8181
* @default undefined
8282
*/
8383
trustedImageOrigins?: string[] | undefined;

packages/plugins/profile-image/src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ export function detectImageFormatFromBase64(
5252
return null;
5353
}
5454

55-
5655
export async function detectFileTypeFromBlob(blob: Blob) {
5756
const arrayBuffer = await blob.arrayBuffer(); // convert blob to ArrayBuffer
5857
const uint8Array = new Uint8Array(arrayBuffer); // required by file-type
59-
58+
6059
const fileType = await fileTypeFromBuffer(uint8Array);
6160
return fileType; // returns { ext: "png", mime: "image/png" } or undefined
62-
}
61+
}

0 commit comments

Comments
 (0)