Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

IOdan78
Copy link
Collaborator

@IOdan78 IOdan78 commented Jun 15, 2024

No description provided.

const applicationService = useApplicationService();

// Fetch product detail by id
const {id} = useParams<{id: string}>();
Copy link
Owner

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}>();
Copy link
Owner

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);
Copy link
Owner

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 {
Copy link
Owner

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 {
Copy link
Owner

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 */}
Copy link
Owner

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={}
Copy link
Owner

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={}
Copy link
Owner

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}`
Copy link
Owner

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}`)}
Copy link
Owner

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?

@thongdanghoang thongdanghoang deleted the SWD-46-exchange-detail-popup branch June 21, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants