Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,4 @@ All commits and PR titles must follow [Conventional Commits](https://www.convent

## Acknowledgments

Built with NestJS, PostgreSQL, Prisma, OpenAI, and the support of the education technology community.
Built with NestJS, Prisma, PostgreSQL, OpenAI, and the support of the education technology community.
7 changes: 4 additions & 3 deletions apps/web/components/WarningAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ExclamationTriangleIcon } from "@heroicons/react/24/solid";
import { type ReactNode } from "react";
import { type FC, type ReactNode } from "react";
import { createPortal } from "react-dom";

interface ModalProps {
Expand All @@ -12,22 +12,23 @@ interface ModalProps {
children?: ReactNode;
}

const WarningAlert: React.FC<ModalProps> = ({
const WarningAlert: FC<ModalProps> = ({
isOpen,
onClose,
onConfirm,
description,
confirmText = "Proceed",
cancelText = "Cancel",
children,
}: ModalProps) => {
}) => {
if (!isOpen) return null;

return createPortal(
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
<div className="bg-white rounded-xl shadow-lg max-w-md w-full p-6 relative animate-fadeIn">
<button
onClick={onClose}
aria-label="Close warning dialog"
className="absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors"
>
Expand Down
Loading