-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORPORATION: remove TA modals and integrate into sell modal #796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good. Just a minor comment about some import statements
import TextField from "@mui/material/TextField"; | ||
import Button from "@mui/material/Button"; | ||
import { KEY } from "../../../utils/helpers/keyCodes"; | ||
|
||
import { Typography, FormControlLabel, Switch, Tooltip } from "@mui/material"; | ||
import { Division } from "src/Corporation/Division"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this doesn't end up causing any issues because it's being imported just as a type, but we actually need to use relative paths for imports. If Division was being imported for runtime use then you would get a build error due to this being an absolute path.
Also when importing a class just to reference its type, it's best practice to do import type
and put it above all the regular imports, this makes it clearer what the import dependencies are as far as figuring out circular dependencies. Types can have circular imports and they're fine with that, but runtime imports can sometimes cause issues when there is a circular dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use VSCode you can have it automatically do relative paths for things it autosuggests, I didn't know about this for the longest time and was manually converting to relative paths:
File -> Preferences -> Settings -> User or Workspace tab (I have it set for User but Workspace is more correct) -> Filter for "import" -> Select Extensions/Typescript -> set "Import module specifier" for JS and TS to "relative"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill keep that in mind thanks!
import { KEY } from "../../../utils/helpers/keyCodes"; | ||
import { CityName } from "@enums"; | ||
import { Division } from "src/Corporation/Division"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about import statement
See the comments for future reference, I am just merging this and I'll make some related import changes afterwards. |
as stated removes the TA modals and integrate the TA toggles into the sell modal
keeping them seperated just means alot more clicks to open and close the modals
combining them just makes sense to have one modal where the selling can be interacted with
for the text i sticked with the usefull pieces from the old, suggestions or later prs to change it up and improve it are appreciated