File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
components/WorkspaceSetup/steps Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,18 @@ export const SpendingLimit: React.FC<StepProps> = ({
2323 const urlWorkspaceId = getQueryParam ( 'workspace' ) ;
2424 const [ error , setError ] = React . useState < React . ReactNode > ( '' ) ;
2525 const { isPro } = useWorkspaceSubscription ( ) ;
26+ const maxSpendingLimit = isPro ? 1000 : 100 ;
2627
2728 const handleChange = e => {
2829 setError ( '' ) ;
2930 const value = Number ( e . target . value ) ;
3031 if ( Number . isNaN ( value ) || value < 0 ) {
31- setError ( ' Please enter a valid amount between 0 and 100' ) ;
32- } else if ( value > 100 ) {
32+ setError ( ` Please enter a valid amount between 0 and ${ maxSpendingLimit } ` ) ;
33+ } else if ( value > maxSpendingLimit ) {
3334 setError (
3435 < >
35- For the first two billing cycles, the maximum limit is $100. If you
36- need a higher limit,{ ' ' }
36+ For the first two billing cycles, the maximum limit is $
37+ { maxSpendingLimit } . If you need a higher limit,{ ' ' }
3738 < Text as = "a" href = "mailto:[email protected] " > 3839 contact us
3940 </ Text >
@@ -95,7 +96,7 @@ export const SpendingLimit: React.FC<StepProps> = ({
9596 id = "spending-limit"
9697 name = "spending-limit"
9798 required
98- max = { 100 }
99+ max = { maxSpendingLimit }
99100 min = { 0 }
100101 defaultValue = { checkout . spendingLimit }
101102 type = "number"
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
158158 path = { dashboardUrls . getStarted ( activeTeam ) }
159159 icon = "documentation"
160160 />
161- { isFree && isTeamAdmin && (
161+ { isTeamAdmin && (
162162 < RowItem
163163 name = "Upgrade"
164164 page = "external"
You can’t perform that action at this time.
0 commit comments