Normalize to double quotes across all files with Prettier
This commit is contained in:
1 parent
73bff72cec
commit
a5659cf4c8
190 files changed
+9523
-8859
No files matched your search
@@ -1,16 +1,16 @@
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { useSearchParams, Link } from 'react-router-dom';
|
||||
import { useTmdbSearch, useTmdbSearchPeople } from '@/hooks/useTmdb';
|
||||
import { useLibrary } from '@/hooks/useEntries';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Search } from 'lucide-react';
|
||||
import { EntryCard } from '@/components/entries/EntryCard';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { getTmdbImageUrl } from '@/lib/api';
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { useSearchParams, Link } from "react-router-dom";
|
||||
import { useTmdbSearch, useTmdbSearchPeople } from "@/hooks/useTmdb";
|
||||
import { useLibrary } from "@/hooks/useEntries";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Search } from "lucide-react";
|
||||
import { EntryCard } from "@/components/entries/EntryCard";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { getTmdbImageUrl } from "@/lib/api";
|
||||
|
||||
export function SearchPage() {
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const initialQuery = searchParams.get('q') || '';
|
||||
const initialQuery = searchParams.get("q") || "";
|
||||
const [searchInput, setSearchInput] = useState(initialQuery);
|
||||
const [debouncedQuery, setDebouncedQuery] = useState(initialQuery);
|
||||
const debounceRef = useRef<ReturnType<typeof setTimeout>>();
|
||||
@@ -39,8 +39,10 @@ export function SearchPage() {
|
||||
const searchResults = useTmdbSearch(debouncedQuery);
|
||||
const peopleResults = useTmdbSearchPeople(debouncedQuery);
|
||||
|
||||
const searchEntries = searchResults.data?.pages.flatMap((p) => p.results) ?? [];
|
||||
const searchPeople = peopleResults.data?.pages.flatMap((p) => p.results) ?? [];
|
||||
const searchEntries =
|
||||
searchResults.data?.pages.flatMap((p) => p.results) ?? [];
|
||||
const searchPeople =
|
||||
peopleResults.data?.pages.flatMap((p) => p.results) ?? [];
|
||||
|
||||
const isSearching = debouncedQuery.length > 0;
|
||||
|
||||
@@ -73,16 +75,26 @@ export function SearchPage() {
|
||||
>
|
||||
<Avatar className="h-7 w-7">
|
||||
<AvatarImage
|
||||
src={person.profile_path ? getTmdbImageUrl(person.profile_path, 'w92') : undefined}
|
||||
src={
|
||||
person.profile_path
|
||||
? getTmdbImageUrl(person.profile_path, "w92")
|
||||
: undefined
|
||||
}
|
||||
alt={person.name}
|
||||
/>
|
||||
<AvatarFallback className="text-xs">
|
||||
{person.name.split(' ').map((n) => n[0]).join('').slice(0, 2)}
|
||||
{person.name
|
||||
.split(" ")
|
||||
.map((n) => n[0])
|
||||
.join("")
|
||||
.slice(0, 2)}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<span className="text-sm font-medium">{person.name}</span>
|
||||
{person.known_for_department && (
|
||||
<span className="text-xs text-muted-foreground">{person.known_for_department}</span>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{person.known_for_department}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user