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
@@ -3,13 +3,13 @@ import {
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useUpdateEntry, useUpdateEntryRatings } from '@/hooks/useEntries';
|
||||
import { StarRating } from '@/components/ui/star-rating';
|
||||
import type { Entry } from '@/types';
|
||||
} from "@/components/ui/dialog";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { useUpdateEntry, useUpdateEntryRatings } from "@/hooks/useEntries";
|
||||
import { StarRating } from "@/components/ui/star-rating";
|
||||
import type { Entry } from "@/types";
|
||||
|
||||
interface EntrySettingsDialogProps {
|
||||
open: boolean;
|
||||
@@ -30,11 +30,11 @@ export function EntrySettingsDialog({
|
||||
};
|
||||
|
||||
const boolSettings = [
|
||||
{ field: 'favorit' as const, label: 'Favorite' },
|
||||
{ field: 'hidden' as const, label: 'Hidden' },
|
||||
{ field: 'watchlist' as const, label: 'Watchlist' },
|
||||
{ field: 'show_in_calendar' as const, label: 'Show in Calendar' },
|
||||
{ field: 'auto_sync' as const, label: 'Auto Sync' },
|
||||
{ field: "favorit" as const, label: "Favorite" },
|
||||
{ field: "hidden" as const, label: "Hidden" },
|
||||
{ field: "watchlist" as const, label: "Watchlist" },
|
||||
{ field: "show_in_calendar" as const, label: "Show in Calendar" },
|
||||
{ field: "auto_sync" as const, label: "Auto Sync" },
|
||||
];
|
||||
|
||||
const userRating = entry.entryRatings?.user_rating ?? 0;
|
||||
@@ -51,11 +51,16 @@ export function EntrySettingsDialog({
|
||||
<DialogContent className="sm:max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Entry Settings</DialogTitle>
|
||||
<p className="text-sm text-muted-foreground line-clamp-1">{entry.title}</p>
|
||||
<p className="text-sm text-muted-foreground line-clamp-1">
|
||||
{entry.title}
|
||||
</p>
|
||||
</DialogHeader>
|
||||
<div className="space-y-1 py-2">
|
||||
{boolSettings.map(({ field, label }) => (
|
||||
<div key={field} className="flex items-center justify-between rounded-lg px-1 py-2.5">
|
||||
<div
|
||||
key={field}
|
||||
className="flex items-center justify-between rounded-lg px-1 py-2.5"
|
||||
>
|
||||
<Label htmlFor={field} className="cursor-pointer">
|
||||
{label}
|
||||
</Label>
|
||||
@@ -70,9 +75,13 @@ export function EntrySettingsDialog({
|
||||
<div className="space-y-2 rounded-lg px-1 py-2.5">
|
||||
<Label>Your Rating</Label>
|
||||
<div className="flex items-center gap-3">
|
||||
<StarRating value={userRating} onChange={handleRatingChange} size="sm" />
|
||||
<StarRating
|
||||
value={userRating}
|
||||
onChange={handleRatingChange}
|
||||
size="sm"
|
||||
/>
|
||||
<span className="text-sm text-muted-foreground tabular-nums">
|
||||
{userRating > 0 ? `${userRating}/10` : '—'}
|
||||
{userRating > 0 ? `${userRating}/10` : "—"}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user