Connect, collaborate, and grow with a community of TypeScript developers
chore: remove loader from enroll button
bautistaaa345526929902
diff --git a/apps/web/src/app/[locale]/tracks/_components/enroll-button.tsx b/apps/web/src/app/[locale]/tracks/_components/enroll-button.tsxindex 4f232b39..2e289b72 100644--- a/apps/web/src/app/[locale]/tracks/_components/enroll-button.tsx+++ b/apps/web/src/app/[locale]/tracks/_components/enroll-button.tsx@@ -2,10 +2,8 @@import { Button } from '@repo/ui/components/button';import { toast } from '@repo/ui/components/use-toast';-import type { enrollUserInTrack, unenrollUserFromTrack } from './track.action';import { useState } from 'react';-import { Loader2 } from '@repo/ui/icons';-import { Play } from 'next/font/google';+import type { enrollUserInTrack, unenrollUserFromTrack } from './track.action';interface EnrollButtonProps {action: typeof enrollUserInTrack | typeof unenrollUserFromTrack;@@ -54,22 +52,16 @@ export function ActionButton({ action, text, trackId }: EnrollButtonProps) {}}}>- {isLoading ? (- <Loader2 className="mx-[1.125rem] h-5 w-5 animate-spin" />- ) : text == 'Enroll' ? (- <>- <svg- className="-ml-2 mr-1.5 h-5 w-5 fill-current"- xmlns="http://www.w3.org/2000/svg"- viewBox="0 -960 960 960"- >- <path d="M320-273v-414q0-17 12-28.5t28-11.5q5 0 10.5 1.5T381-721l326 207q9 6 13.5 15t4.5 19q0 10-4.5 19T707-446L381-239q-5 3-10.5 4.5T360-233q-16 0-28-11.5T320-273Z" />- </svg>- {text}- </>- ) : (- text- )}+ <>+ <svg+ className="-ml-2 mr-1.5 h-5 w-5 fill-current"+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 -960 960 960"+ >+ <path d="M320-273v-414q0-17 12-28.5t28-11.5q5 0 10.5 1.5T381-721l326 207q9 6 13.5 15t4.5 19q0 10-4.5 19T707-446L381-239q-5 3-10.5 4.5T360-233q-16 0-28-11.5T320-273Z" />+ </svg>+ {text}+ </></Button>);}