Skip to content

Commit

Permalink
chore: remove console log + general bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arshptl committed Dec 28, 2023
1 parent 0d3073e commit 78ac586
Show file tree
Hide file tree
Showing 12 changed files with 156 additions and 164 deletions.
4 changes: 2 additions & 2 deletions components/ToolScreen/CategoryItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const CategoryItem = ({ executeScroll, menuItem, setMenuItem }) => {
});
};

const CategoryItemMobile = ({ executeScroll, setMenuItem }) => {
const CategoryItemMobile = ({ executeScroll, setMenuItem, menuItem }) => {
const scrollDirection = useScrollDirection("down");
return (
<StyledMobileCategory scrollDirection={scrollDirection}>
Expand All @@ -152,7 +152,7 @@ const CategoryItemMobile = ({ executeScroll, setMenuItem }) => {
>
{config.categoryList.map((obj) => {
return (
<option value={obj.id} key={obj.key}>
<option value={obj.id} key={obj.key} selected={menuItem === obj.id}>
{" "}
{obj.name}
</option>
Expand Down
9 changes: 4 additions & 5 deletions components/Tools/ColorTools/RgbToHex/converterFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,19 +761,19 @@ export function CMYKToHex(cmyk) {
// strip the slash if using space-separated syntax
if (cmyk.indexOf("/") > -1) cmyk.splice(3, 1);

let c = cmyk[0] /100,
let c = cmyk[0] / 100,
m = cmyk[1] / 100,
y = cmyk[2] / 100,
k = cmyk[3] / 100;

c = c * (1 - k) + k;
m = m * (1 - k) + k;
y = y * (1 - k) + k;

let r = 1 - c,
g = 1 - m,
b = 1 - y;

r = Math.round(255 * r);
g = Math.round(255 * g);
b = Math.round(255 * b);
Expand All @@ -786,7 +786,6 @@ export function CMYKToHex(cmyk) {
if (g.length == 1) g = "0" + g;
if (b.length == 1) b = "0" + b;

console.log("#" + r + g + b);
// console.log("#" + r + g + b);
return "#" + r + g + b;

}
8 changes: 4 additions & 4 deletions components/Tools/ColorTools/RgbToHex/rgbHexConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const rgbHexConverter = () => {

const handleConvert = () => {
const currentValue = userInput;
console.log(output);
// console.log(output);
handleValidation(currentValue);
};

Expand Down Expand Up @@ -236,7 +236,7 @@ const rgbHexConverter = () => {
];
setOutput(conveterObj);
} else {
console.log("Invalid input");
// console.log("Invalid input");
}
};

Expand All @@ -261,7 +261,7 @@ const rgbHexConverter = () => {
];
setOutput(conveterObj);
} else {
console.log("Invalid input");
// console.log("Invalid input");
}
};

Expand All @@ -274,7 +274,7 @@ const rgbHexConverter = () => {
let hslRegex = regexColorCodeTypes("hsl");
let hslaRegex = regexColorCodeTypes("hsla");

console.log(currentValue)
// console.log(currentValue)

if (hexRegex.test(currentValue)) {
hexConverter(currentValue);
Expand Down
15 changes: 7 additions & 8 deletions components/Tools/DevTools/CSSTransitions/CssTransitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const InputSection = styled.div`
display: flex;
flex-direction: column;
width: 100%;
@media (min-width: 800px) {
width: 40%;
flex-direction: column;
Expand All @@ -41,7 +41,7 @@ const ResultSection = styled.div`
flex-direction: column;
font-size: var(--fz-md);
height: 500px;
@media (min-width: 800px) {
width: 55%;
height: inherit;
Expand All @@ -50,8 +50,8 @@ const ResultSection = styled.div`
`;

const StyledSelectInput = styled.select`
${({ theme }) => theme.mixins.selectInput}
font-size: var(--fz-lg);
${({ theme }) => theme.mixins.selectInput}
font-size: var(--fz-lg);
`;

const OutputBox = styled.div`
Expand Down Expand Up @@ -94,7 +94,7 @@ const ResultCodeSection = styled.div`
margin: auto;
flex-direction: column;
h2{
h2 {
margin-bottom: 0;
}
.desc {
Expand Down Expand Up @@ -131,12 +131,12 @@ const CSSTransitionsGenerator = (props) => {
}, [state.transitionType]);

const onTypeSelect = (e) => {
console.log(e.target.value);
// console.log(e.target.value);
dispatch({ type: "CHANGETYPE", transitionType: e.target.value });
};

const onTFSelect = (e) => {
console.log(e.target.value);
// console.log(e.target.value);
dispatch({ type: "CHANGETFUNCTION", tfvalue: e.target.value });
};

Expand Down Expand Up @@ -223,7 +223,6 @@ const CSSTransitionsGenerator = (props) => {
<p>Hover me</p>
</div>
</OutputBox>

</ResultSection>
</TranstionParentWrapper>
<ResultCodeSection>
Expand Down
18 changes: 6 additions & 12 deletions components/Tools/DevTools/GlassMorphism/GlassMorphismGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ const SlidersSection = styled.div`
}
${({ theme }) => theme.mixins.checkbox};
@media (min-width: 800px) {
flex: 1 0 fill;
align-items: stretch;
Expand Down Expand Up @@ -145,7 +143,7 @@ const CSSProps = styled.div`
border-radius: 5px;
font-family: var(--font-mono);
background-color: ${({ theme }) => theme.shadeBackcard};
font-size: var(--fz-sm);
font-size: var(--fz-sm);
@media (min-width: 800px) {
font-size: var(--fz-lg);
Expand All @@ -154,8 +152,6 @@ const CSSProps = styled.div`
}
`;



const GlassMorphismGenerator = () => {
const HexToRGBobj = (hex) => {
return {
Expand All @@ -176,7 +172,7 @@ const GlassMorphismGenerator = () => {
const onSelectFile = useCallback((file) => {
// generating ObjectURL for input image to preview
const objectUrl = URL.createObjectURL(file);
console.log(objectUrl);
// console.log(objectUrl);
setBgImage(objectUrl);
}, []);

Expand All @@ -188,8 +184,6 @@ const GlassMorphismGenerator = () => {
];
};



const filter = [];

const finalButtons = [
Expand All @@ -207,9 +201,9 @@ const GlassMorphismGenerator = () => {

useEffect(() => {
setRGBColor(() => HexToRGBobj(theme.contrast));
console.log(RGBColor)
console.log(theme.contrast)
}, [theme])
// console.log(RGBColor);
// console.log(theme.contrast);
}, [theme]);

return (
<StyledOuterDiv>
Expand Down Expand Up @@ -289,7 +283,7 @@ const GlassMorphismGenerator = () => {
<input
type="file"
onChange={(e) => {
console.log(e.target.files);
// console.log(e.target.files);
if (!e.target.files || e.target.files.length === 0) {
setBgImage(null);
return;
Expand Down
Loading

1 comment on commit 78ac586

@vercel
Copy link

@vercel vercel bot commented on 78ac586 Dec 28, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.