-
Notifications
You must be signed in to change notification settings - Fork 1
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
Exchange-Detail, Detail-Popup #32
Conversation
const applicationService = useApplicationService(); | ||
|
||
// Fetch product detail by id | ||
const {id} = useParams<{id: string}>(); |
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.
what's does id and second id mean???? use more meaningful variable name
|
||
// Fetch product detail by id | ||
const {id} = useParams<{id: string}>(); | ||
const {secondId} = useParams<{secondId: string}>(); |
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.
like above comment
.createApiClient() | ||
.get(`${AppRoutingConstants.PRODUCTS_PATH}/${secondId}`) | ||
.then(response => { | ||
console.log(response); |
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.
never commit console.log to PR
@import "@assets/styles/variables"; | ||
|
||
.exchange-detail { | ||
.halftop-box { |
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.
what's halftop-box ??? use always use meaningful variables name
border-bottom: 0; | ||
} | ||
|
||
.halfbottom-box { |
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.
use meaningful variable name
</div> | ||
</div> | ||
</div> | ||
{/* Stepper */} |
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.
Never comment code, if this is not done, create TODO or JIRA ticket implement later
<AppButton | ||
className="button" | ||
variant={'primary'} | ||
// onClick={} |
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.
why comment ?
<AppButton | ||
className="button" | ||
variant={'tertiary'} | ||
// onClick={} |
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.
why comment code?
@@ -111,7 +111,9 @@ export default function ExchangeRequest(): ReactElement { | |||
.createApiClient() | |||
.post(AppRoutingConstants.EXCHANGE_REQUESTS_PATH, exchangeRequest) | |||
.then((): void => { | |||
navigate(AppRoutingConstants.HOMEPAGE); | |||
navigate( | |||
`/exchange-detail/${currentProduct?.id}/${selectedProductId}` |
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.
why don't define variable in AppRoutingConstants -> remove hardcode
@@ -266,6 +268,7 @@ export default function ExchangeRequest(): ReactElement { | |||
variant={'primary'} | |||
disabled={!confirm || !selectedProductId} | |||
onClick={handleExchangeRequestByProduct} | |||
// onClick={() => navigate(`/exchange-detail/${currentProduct?.id}`)} |
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.
why comment out instead remove it?
No description provided.