Skip to content

Commit

Permalink
refactor: move the preview card to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Oct 13, 2024
1 parent 4143e67 commit 94ededf
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions apps/renderer/src/modules/discover/feed-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,6 @@ const FeedInnerForm = ({
</Card>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="flex flex-1 flex-col gap-y-4">
<FormField
control={form.control}
name="view"
render={() => (
<FormItem>
<FormLabel>{t("feed_form.view")}</FormLabel>

<ViewSelectorRadioGroup {...form.register("view")} />
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="title"
Expand Down Expand Up @@ -351,7 +339,27 @@ const FeedInnerForm = ({
</FormItem>
)}
/>
<div className="flex flex-1 items-end justify-end gap-4">
<FormField
control={form.control}
name="view"
render={({ field }) => (
<FormItem>
<div>
<FormLabel>{t("feed_form.view")}</FormLabel>
<FormDescription>{t("feed_form.view_description")}</FormDescription>
</div>

<ViewSelectorRadioGroup
feedOrList={feed}
value={field.value}
{...form.register("view")}
/>
<FormMessage />
</FormItem>
)}
/>

<div className="fixed inset-x-0 bottom-0 flex flex-1 items-end justify-end gap-4 bg-theme-background p-4">
{isSubscribed && (
<Button
type="button"
Expand Down

0 comments on commit 94ededf

Please sign in to comment.