Skip to content

Commit

Permalink
fix: linek nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
Rei-x committed Oct 29, 2024
1 parent 6199bcf commit c249428
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/lib/useCreateEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const useCreateEvent = () => {
const event = await supabase
.from("events")
.insert({
name: new Date().toLocaleString(),
name: `Nowe wydarzenie - ${new Date().toLocaleTimeString()}`,
description: "",
organizerName: "",
ownersSlug: v4(),
Expand Down
104 changes: 54 additions & 50 deletions src/pages/event/[slug]/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export default function Dashboard({
>
<TabsList>
<TabsTrigger value="settings">Ogólne</TabsTrigger>
<TabsTrigger value="personalization">Personalizacja</TabsTrigger>
<TabsTrigger value="sharing">Udostępnianie</TabsTrigger>
</TabsList>
<TabsContent value="settings">
Expand Down Expand Up @@ -162,7 +163,9 @@ export default function Dashboard({
render={({ field }) => (
<FormItem>
<div className="grid w-full max-w-sm items-center gap-1.5">
<FormLabel htmlFor="date">Data</FormLabel>
<FormLabel htmlFor="date">
Data rozpoczęcia wydarzenia
</FormLabel>
<FormControl>
<Popover>
<PopoverTrigger asChild={true}>
Expand Down Expand Up @@ -202,30 +205,6 @@ export default function Dashboard({
)}
/>

<FormField
control={form.control}
name="description"
render={({ field }) => (
<FormItem>
<div className="grid w-full max-w-sm items-center gap-1.5">
<FormLabel htmlFor="description">Opis</FormLabel>
<FormControl>
<MinimalTiptapEditor
className="w-full"
editorContentClassName="p-5"
output="html"
placeholder="Bal inżyniera to wydarzenie, które odbywa się co roku w naszej uczelni. W tym roku mamy dla Was wiele niespodzianek!"
editable={true}
editorClassName="focus:outline-none"
{...field}
/>
</FormControl>
<FormMessage />
</div>
</FormItem>
)}
/>

<FormField
control={form.control}
name="organizerName"
Expand All @@ -247,31 +226,6 @@ export default function Dashboard({
</FormItem>
)}
/>
<FormField
control={form.control}
name="messageAfterRegistration"
render={({ field }) => (
<FormItem>
<div className="grid w-full max-w-sm items-center gap-1.5">
<FormLabel htmlFor="description">
Wiadomość po rejestracji
</FormLabel>
<FormControl>
<MinimalTiptapEditor
className="w-full"
editorContentClassName="p-5"
output="html"
placeholder="Dzięki za zapisanie się!"
editable={true}
editorClassName="focus:outline-none"
{...field}
/>
</FormControl>
<FormMessage />
</div>
</FormItem>
)}
/>
</div>
<Button
disabled={form.formState.isSubmitting}
Expand All @@ -286,6 +240,56 @@ export default function Dashboard({
</form>
</Form>
</TabsContent>
<TabsContent value="personalization">
<FormField
control={form.control}
name="description"
render={({ field }) => (
<FormItem>
<div className="grid w-full max-w-sm items-center gap-1.5">
<FormLabel htmlFor="description">Opis</FormLabel>
<FormControl>
<MinimalTiptapEditor
className="w-full"
editorContentClassName="p-5"
output="html"
placeholder="Bal inżyniera to wydarzenie, które odbywa się co roku w naszej uczelni. W tym roku mamy dla Was wiele niespodzianek!"
editable={true}
editorClassName="focus:outline-none"
{...field}
/>
</FormControl>
<FormMessage />
</div>
</FormItem>
)}
/>
<FormField
control={form.control}
name="messageAfterRegistration"
render={({ field }) => (
<FormItem>
<div className="grid w-full max-w-sm items-center gap-1.5">
<FormLabel htmlFor="description">
Wiadomość po rejestracji
</FormLabel>
<FormControl>
<MinimalTiptapEditor
className="w-full"
editorContentClassName="p-5"
output="html"
placeholder="Dzięki za zapisanie się!"
editable={true}
editorClassName="focus:outline-none"
{...field}
/>
</FormControl>
<FormMessage />
</div>
</FormItem>
)}
/>
</TabsContent>
<TabsContent value="sharing">
<div className="mt-10 flex w-full max-w-screen-md flex-col gap-5">
<div className="grid w-full max-w-sm items-center gap-1.5">
Expand Down

0 comments on commit c249428

Please sign in to comment.