This repository has been archived on 2026-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nextjs-serve-actions/app/components/UI/CreateButton.tsx
2024-05-23 16:55:29 +02:00

15 lines
316 B
TypeScript

'use client';
import { Button } from '@mui/material';
import { useFormStatus } from 'react-dom';
export const CreateButton = () => {
const { pending } = useFormStatus();
return (
<Button variant="outlined" color="primary" type="submit">
{pending ? 'Please wait...' : 'Submit'}
</Button>
);
};