Thanks to visit codestin.com
Credit goes to github.com

Skip to content

React code restructured#468

Merged
akhilgkrishnan merged 5 commits intodevelopfrom
enhancement/react-code-restructuring
Jun 14, 2022
Merged

React code restructured#468
akhilgkrishnan merged 5 commits intodevelopfrom
enhancement/react-code-restructuring

Conversation

@akhilgkrishnan
Copy link
Member

Notion card

Summary

I removed the unwanted import path and added a proper aliased path. For calling components, helpers, apis, common, and utils we don't need to call the functions like ' ../../../ ' we can directly call apis/, common/ etc for the imports.

Also for importing components and package, we should follow default import structure that should be like, and each should be separated with an empty line

1.All the package imports,

  1. helpers, utils, apis imports

  2. custom components

// Package imports
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";

//Utility and helper imports
import { setAuthHeaders, registerIntercepts } from "apis/axios";
import clients from "apis/clients";
import AmountBoxContainer from "common/AmountBox";
import ChartBar from "common/ChartBar";

// Custom component imports
import DeleteClient from "components/Modals/DeleteClient";
import EditClient from "components/Modals/EditClient";
import NewClient from "components/Modals/NewClient";

Preview

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • I have manually tested all workflows
  • I have performed a self-review of my own code
  • I have added automated tests for my code

Copy link
Contributor

@onkar-saeloun onkar-saeloun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions
Copy link

Current Code Coverage Percent of this PR:

89.12 %

Files having coverage below 100%

Impacted Files Coverage
/app/controllers/users/invitations_controller.rb 86.36 %
/app/services/invoice_payment/checkout.rb 44.0 %
/app/services/invoice_payment/pdf_generation.rb 70.97 %
/app/controllers/internal_api/v1/companies_controller.rb 95.45 %
/app/controllers/internal_api/v1/profile_controller.rb 96.88 %
/app/controllers/internal_api/v1/payment_settings_controller.rb 93.33 %
/app/controllers/internal_api/v1/wise/recipients_controller.rb 90.0 %
/app/controllers/internal_api/v1/payments/providers_controller.rb 94.74 %
/lib/benchmarking/benchmarker.rb 0.0 %

@akhilgkrishnan akhilgkrishnan merged commit c850abc into develop Jun 14, 2022
@akhilgkrishnan akhilgkrishnan deleted the enhancement/react-code-restructuring branch June 14, 2022 05:19
vipulnsward pushed a commit that referenced this pull request Feb 15, 2026
* React code restructured

* changed API route

* removed toaster message

* added set auth header and removed toaster messages

Co-authored-by: onkar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants