Skip to content

Commit

Permalink
refactor: Format
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Dec 14, 2023
1 parent e4bd6ff commit ad0ea38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions components/editor/unsplash-dialog.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -130,9 +128,10 @@ const UnsplashDialog = () => {
<form onSubmit={handleUnsplashSearch}>
<div className="flex">
<Link
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">
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"
>
<h1 className="font-heading text-xl">Unsplash</h1>
</Link>
<div className="flex h-full w-1/2 justify-end">
Expand Down
2 changes: 1 addition & 1 deletion components/image-with-skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <span className="hover:underline">{image.user.name}</span>{" "}
<ArrowTopRightIcon className="inline-block h-3 w-3 group-hover:translate-y-[-1px] delay-300 transition-transform duration-200" />
<ArrowTopRightIcon className="inline-block h-3 w-3 transition-transform duration-200 delay-300 group-hover:translate-y-[-1px]" />
</Link>
</div>
</div>
Expand Down

1 comment on commit ad0ea38

@vercel
Copy link

@vercel vercel bot commented on ad0ea38 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.