This PR refactors the getColor function and the code that maps codons to nucleotides in the SingleRow.jsx file. The goal is to improve modularity and maintainability by moving these pieces of functionality into their own separate files.
Summary of Changes
Created a new file getColor.js in the src/utils directory to contain the getColor function.
Moved the getColor function from SingleRow.jsx to getColor.js.
Exported the getColor function from getColor.js so it can be imported in other files.
Created a new file codonMapping.js in the src/utils directory to contain the code that maps codons to nucleotides.
Moved the codon mapping code from SingleRow.jsx to codonMapping.js.
Exported the necessary functions or variables from codonMapping.js so they can be imported in other files.
Updated the import statements in SingleRow.jsx to import the getColor function and the codon mapping code from their new respective files.
These changes improve the modularity and readability of the code, making it easier to maintain and debug in the future.
Fixes #32.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR refactors the
getColor
function and the code that maps codons to nucleotides in theSingleRow.jsx
file. The goal is to improve modularity and maintainability by moving these pieces of functionality into their own separate files.Summary of Changes
getColor.js
in thesrc/utils
directory to contain thegetColor
function.getColor
function fromSingleRow.jsx
togetColor.js
.getColor
function fromgetColor.js
so it can be imported in other files.codonMapping.js
in thesrc/utils
directory to contain the code that maps codons to nucleotides.SingleRow.jsx
tocodonMapping.js
.codonMapping.js
so they can be imported in other files.SingleRow.jsx
to import thegetColor
function and the codon mapping code from their new respective files.These changes improve the modularity and readability of the code, making it easier to maintain and debug in the future.
Fixes #32.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.