mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-05 04:02:21 +02:00
🐛 Fix redundant use of card in edit options
This commit is contained in:
parent
197c6804fb
commit
ab070c0d80
1 changed files with 4 additions and 21 deletions
|
@ -1,11 +1,5 @@
|
|||
import { Button } from "@rallly/ui/button";
|
||||
import {
|
||||
Card,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@rallly/ui/card";
|
||||
import { CardFooter } from "@rallly/ui/card";
|
||||
import { Form } from "@rallly/ui/form";
|
||||
import dayjs from "dayjs";
|
||||
import Link from "next/link";
|
||||
|
@ -72,6 +66,7 @@ const Page: NextPageWithLayout = () => {
|
|||
return (
|
||||
<Form {...form}>
|
||||
<form
|
||||
className="mx-auto max-w-3xl"
|
||||
onSubmit={form.handleSubmit((data) => {
|
||||
const encodedOptions = data.options.map(encodeDateOption);
|
||||
const optionsToDelete = poll.options.filter((option) => {
|
||||
|
@ -124,19 +119,7 @@ const Page: NextPageWithLayout = () => {
|
|||
}
|
||||
})}
|
||||
>
|
||||
<Card className="mx-auto max-w-4xl">
|
||||
<CardHeader>
|
||||
<CardTitle>
|
||||
<Trans i18nKey="editOptions" />
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
<Trans
|
||||
i18nKey="editOptionsDescription"
|
||||
defaults="Change the options available in your poll."
|
||||
/>
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<PollOptionsForm />
|
||||
<PollOptionsForm>
|
||||
<CardFooter className="justify-between">
|
||||
<Button asChild>
|
||||
<Link href={pollLink}>
|
||||
|
@ -147,7 +130,7 @@ const Page: NextPageWithLayout = () => {
|
|||
<Trans i18nKey="save" />
|
||||
</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</PollOptionsForm>
|
||||
</form>
|
||||
</Form>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue