Skip to content

Commit

Permalink
Merge pull request #558 from MSaiKiran9/train-button
Browse files Browse the repository at this point in the history
Train button Disabled Before Selecting File
  • Loading branch information
dartpain authored Oct 14, 2023
2 parents c04b765 + 993c9b3 commit fde8de8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions frontend/src/upload/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ export default function Upload({
setProgress(undefined);
setModalState('INACTIVE');
}}
className={`rounded-3xl bg-purple-30 px-4 py-2 text-sm font-medium text-white ${
isCancellable ? '' : 'hidden'
}`}
className={`rounded-3xl bg-purple-30 px-4 py-2 text-sm font-medium text-white ${isCancellable ? '' : 'hidden'
}`}
>
Finish
</button>
Expand Down Expand Up @@ -206,7 +205,9 @@ export default function Upload({
<div className="flex flex-row-reverse">
<button
onClick={uploadFile}
className="ml-6 rounded-3xl bg-purple-30 py-2 px-6 text-white"
className={`ml-6 rounded-3xl bg-purple-30 text-white ${files.length > 0 ? '' : 'bg-opacity-75 text-opacity-80'
} py-2 px-6`}
disabled={files.length === 0} // Disable the button if no file is selected
>
Train
</button>
Expand All @@ -227,9 +228,8 @@ export default function Upload({

return (
<article
className={`${
modalState === 'ACTIVE' ? 'visible' : 'hidden'
} absolute z-30 h-screen w-screen bg-gray-alpha`}
className={`${modalState === 'ACTIVE' ? 'visible' : 'hidden'
} absolute z-30 h-screen w-screen bg-gray-alpha`}
>
<article className="mx-auto mt-24 flex w-[90vw] max-w-lg flex-col gap-4 rounded-lg bg-white p-6 shadow-lg">
{view}
Expand Down

2 comments on commit fde8de8

@vercel
Copy link

@vercel vercel bot commented on fde8de8 Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs-gpt – ./frontend

docs-gpt-arc53.vercel.app
docs-gpt-brown.vercel.app
docs-gpt-git-main-arc53.vercel.app

@vercel
Copy link

@vercel vercel bot commented on fde8de8 Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nextra-docsgpt – ./docs

nextra-docsgpt-git-main-arc53.vercel.app
nextra-docsgpt.vercel.app
docs.docsgpt.co.uk
nextra-docsgpt-arc53.vercel.app

Please sign in to comment.