Skip to content

Commit da230fb

Browse files
committed
fix delete style add todos
1 parent 446a0ae commit da230fb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
- when deleting a segment the app crashes (I think it's related to logic for redirecting the user to a previous segment)
44
- when reordering modules, the navigation buttons do not seem to navigate the correct order of modules... are we sorting the modules by order? are we correctly updating the order on modules when we re-arrange them?
5+
- clicking on the delete module button expands the accordion but it should prevent default
6+
- it's not possible to dismiss the delete dialog when clicking outside the dialog, but I would think a better UX would be to allow it. research what's good UX and fix if it is an issue
57

68
# Features
79

@@ -16,3 +18,4 @@
1618
- the ability to pick custom lucide-icons for the modules
1719
- editing the segment should change the nested layout, not go to a new page
1820
- experiment with having "new segment" show a modal with the form
21+
- load up a testimonial modal / dialog when clicking the testimonial button instead of a separate page.

src/routes/learn/-components/delete-module-button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button } from "~/components/ui/button";
1+
import { Button, buttonVariants } from "~/components/ui/button";
22
import { Trash2 } from "lucide-react";
33
import { createServerFn } from "@tanstack/react-start";
44
import { z } from "zod";
@@ -88,12 +88,14 @@ export function DeleteModuleButton({
8888
</AlertDialogDescription>
8989
</AlertDialogHeader>
9090
<AlertDialogFooter className="flex gap-3 p-6 pt-0">
91-
<AlertDialogCancel className="px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-all duration-200 border border-border rounded-md hover:bg-muted">
91+
<AlertDialogCancel
92+
className={buttonVariants({ variant: "gray-outline" })}
93+
>
9294
Cancel
9395
</AlertDialogCancel>
9496
<AlertDialogAction
9597
onClick={handleDeleteModule}
96-
className="btn-gradient-red px-4 py-2 text-sm font-medium rounded-md"
98+
className={buttonVariants({ variant: "destructive" })}
9799
>
98100
Delete Module
99101
</AlertDialogAction>

0 commit comments

Comments
 (0)