Skip to content

Commit

Permalink
[GREEN] Successfuly changing button state
Browse files Browse the repository at this point in the history
  • Loading branch information
emiriko committed May 18, 2024
1 parent d38afa4 commit f07388c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/app/event/(event)/EventPurpose.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEventContext } from '@/components/contexts/EventContext'
import { Button } from '@/components/elements/Button'
import { Input } from '@/components/elements/Forms/input'
import { useCreateEventMutation } from '@/redux/api/eventApi'
import { useAppSelector } from '@/redux/store'
Expand Down Expand Up @@ -154,23 +155,22 @@ export const EventPurpose: React.FC = () => {
width={50}
className="w-full"
/>
{isLoading ? <LoadingButton
type="submit"
className="!text-center !font-bold rounded-lg flex justify-center m-auto !bg-teal-600 !text-white !w-full max-w-sm !px-6 !py-3"
loading={isLoading}
loadingIndicator={'Creating...'}
>
Plan{' '}
</LoadingButton> :
<LoadingButton
type="submit"
className="!text-center !font-bold rounded-lg flex justify-center m-auto !bg-teal-600 !text-white !w-full max-w-sm !px-6 !py-3"
loading={isLoading}
loadingIndicator={'Creating...'}
>
Plan{' '}
</LoadingButton>
}
{isLoading ? (
<LoadingButton
type="submit"
className="!text-center !font-bold rounded-lg flex justify-center m-auto !bg-teal-600 !text-white !w-full max-w-sm !px-6 !py-3"
loading={isLoading}
loadingIndicator={'Creating...'}
>
</LoadingButton>
) : (
<Button
type="submit"
className="!text-center !font-bold rounded-lg flex justify-center m-auto !bg-teal-600 !text-white !w-full max-w-sm !px-6 !py-3"
>
Plan{' '}
</Button>
)}
</div>
<Snackbar
open={open}
Expand Down

0 comments on commit f07388c

Please sign in to comment.