This repository was archived by the owner on Sep 30, 2024. It is now read-only.
SSC: Handle team=1 input on checkout form#62906
Merged
Merged
Conversation
vdavid
commented
May 24, 2024
| export interface Call<Resp> { | ||
| method: 'GET' | 'POST' | 'PATCH' | 'DELETE' | ||
| urlSuffix: string | ||
| requestBody?: any |
Contributor
Author
There was a problem hiding this comment.
ESLint complained about the explicit any and suggested either never or unknown. I went with unknown because never seemed like a non-solution.
vdavid
commented
May 24, 2024
| // https://maxrozen.com/race-conditions-fetching-data-react-with-useeffect | ||
| let ignore = false | ||
|
|
||
| ;(async () => { |
Contributor
Author
There was a problem hiding this comment.
I thought this was fine with the linter but it wasn't because it discarded the returned promise. I refactored it to this longer format because this one may be obscure to some devs, and we use it very rarely in the codebase.
vdavid
commented
May 24, 2024
| interval: 'monthly', | ||
| seats: 1, | ||
| // If creating a team, we set seatCount=0, which means the user can adjust the seat count. | ||
| seats: creatingTeam ? 0 : 1, |
Contributor
Author
There was a problem hiding this comment.
This is the meat of the PR, really. It's a copy of the functionality on the old SSC site, and also is very simple.
taras-yemets
approved these changes
May 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already have this on the old SSC front end since my earlier PR https://github.com/sourcegraph/self-serve-cody/pull/779. Now bringing the same feature to this page because we'll migrate our front end to this one, so we'll need it.
Note: This PR contains a bunch of random small fixes. Sorry for polluting the PR with so many little changes. I promise they are trivial, and I carefully checked the changes.
Test plan
Tested that with the
?team=1parameter, the page displays the seat number setting UI, and without it, it doesn't.For the refactors, CI.