From ad0ea385dd79c00d2c466235a3f87d0e0d7c5ada Mon Sep 17 00:00:00 2001 From: arshad-yaseen Date: Thu, 14 Dec 2023 10:48:38 +0530 Subject: [PATCH] refactor: Format --- components/editor/unsplash-dialog.tsx | 17 ++++++++--------- components/image-with-skeleton.tsx | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/editor/unsplash-dialog.tsx b/components/editor/unsplash-dialog.tsx index 5e55a9d..afcacda 100644 --- a/components/editor/unsplash-dialog.tsx +++ b/components/editor/unsplash-dialog.tsx @@ -1,11 +1,14 @@ import React, { ChangeEvent, FormEvent, useRef, useState } from "react" +import Link from "next/link" import { monacoInstanceState } from "@/atoms/editor" import { editorAction, uploadFile } from "@/utils/editor" import { GET } from "@/utils/http.utils" import { useAtomValue } from "jotai" import { ImageIcon, Loader2Icon, SearchIcon } from "lucide-react" import { toast } from "sonner" +import { type Photos as UnsplashPhotos } from "unsplash-js/dist/methods/search/types/response" +import { siteConfig } from "@/config/site" import { Button } from "@/components/ui/button" import { Dialog, DialogContent } from "@/components/ui/dialog" import { Input } from "@/components/ui/input" @@ -17,13 +20,8 @@ import { SelectValue, } from "@/components/ui/select" import ImageWithSkeleton from "@/components/image-with-skeleton" -import { - type Photos as UnsplashPhotos, -} from "unsplash-js/dist/methods/search/types/response" -import Link from "next/link" -import { siteConfig } from "@/config/site" -export type UnsplashImageResponse = UnsplashPhotos['results'][number] +export type UnsplashImageResponse = UnsplashPhotos["results"][number] interface UnsplashSearchFormData { unsplash_image_query: string @@ -130,9 +128,10 @@ const UnsplashDialog = () => {
+ href={`https://unsplash.com/?utm_source=${siteConfig.short_name}&utm_medium=referral`} + target="_blank" + className="flex h-full w-1/2 justify-start hover:opacity-70" + >

Unsplash

diff --git a/components/image-with-skeleton.tsx b/components/image-with-skeleton.tsx index 36a2e3e..3edced6 100644 --- a/components/image-with-skeleton.tsx +++ b/components/image-with-skeleton.tsx @@ -46,7 +46,7 @@ const ImageWithSkeleton = ({ className="z-20 rounded-full bg-foreground/50 px-2 py-1 text-xs text-background transition-all duration-200" > By {image.user.name}{" "} - +