Skip to content

Commit

Permalink
sonar cloud fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Nov 24, 2023
1 parent 8de28bd commit bcb5cdb
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 59 deletions.
1 change: 0 additions & 1 deletion ui/src/data/routeData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export type RouteId =
| "interview"
| "jsontotypescript"
| "mimetype"
| "mimetype"
| "movie"
| "newsfeed"
| "npmpackages"
Expand Down
4 changes: 0 additions & 4 deletions ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
@import "./styles/global.css";
@import "./styles/other-overrides.css";

/* * {
outline: 1px red solid;
} */

*,
*::before,
*::after {
Expand Down
5 changes: 2 additions & 3 deletions ui/src/pages/About/About.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

&__intro {
p {
text-align: right;
font-size: 14px;
background: linear-gradient(
to bottom,
Expand All @@ -22,12 +23,10 @@
background-repeat: repeat-y;
background-size: 1000% 1px;
}

&_text {
color: white !important;
}
p {
text-align: right;
}
}

&_cover {
Expand Down
3 changes: 0 additions & 3 deletions ui/src/pages/CSS/BorderRadius/BorderRadius.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ $br-dvh-25: 25dvh;
align-items: center;
justify-content: center;
height: $br-dvh-25;
}

&_text {
overflow: hidden;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/CSS/BorderRadius/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useState } from "react";
import { Card, Form, Slider } from "antd";
import { PageGrid, InputGrid } from "components/Layouts";
import { CodeHighlightWithCopy } from "components/General";
import style from "./BorderRadius.module.scss";
import {
CodeHighlightWithCopy,
ColorPickerWithInput,
ResponsiveInputWithLabel,
ResponsiveSegementWithLabel,
Expand Down
Empty file.
3 changes: 1 addition & 2 deletions ui/src/pages/CSS/Units/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from "react";
import styles from "./Units.module.scss";

const Units: React.FC = () => {
return <div className={styles.root}></div>;
return <div></div>;
};

export default Units;
11 changes: 7 additions & 4 deletions ui/src/pages/Colors/ColorPicker/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import React, { useEffect, useMemo, useState } from "react";
import style from "./ColorPicker.module.scss";
import { Card, Form, Space } from "antd";
import { ColorPicker as CP } from "@mantine/core";
import { INITIAL_COLOR, INITIAL_FORMAT } from "./utils/constants";
import { ColorPicker as Cp } from "@mantine/core";
import {
INITIAL_COLOR,
INITIAL_FORMAT,
FORMAT_LABELS,
} from "./utils/constants";
import ColorFormatTags from "./components/ColorFormatTags";
import { Clipboard } from "components/ComponentInjector";
import DisplayColors from "./components/DisplayColors";
Expand All @@ -11,7 +15,6 @@ import { CopyInput } from "components/Layouts";
import { ResponsiveInputWithLabel } from "components/General";
import useParamsValue from "hooks/useParamsValue";
import { useDebounce } from "hooks/useDebounce";
import { FORMAT_LABELS } from "./utils/constants";
import { PARAMS } from "data/paramsData";
import { ClipboardButton } from "components/InjectedComponent";

Expand Down Expand Up @@ -74,7 +77,7 @@ const ColorPicker: React.FC = () => {
/>
</Form.Item>

<CP
<Cp
format={format}
value={color}
onChange={(value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
formatShades,
generateRandomColor,
} from "pages/Colors/ShadesAndTints/utils/helper";
import { useEffect, useState } from "react";
import { useEffect, useState, ChangeEvent } from "react";
import {
ColorPickerWithInput,
Icon,
Expand All @@ -19,7 +19,6 @@ import {
ResponsiveSegementWithLabel,
ResponsiveSelectWithLabel,
} from "components/General";
import { ChangeEvent } from "react";
import { SelectOption } from "pages/Colors/ShadesAndTints/utils/types";
import { ClipboardButton } from "components/InjectedComponent";

Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Generator/Avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { toPng, toJpeg } from "html-to-image";
import { Card, Form, Slider, Avatar as AntAvatar, Space } from "antd";
import { ColorPickerWithInput } from "components/General";
import WebFont from "webfontloader";
import {
ColorPickerWithInput,
DropdownDownloadButton,
Warning,
ResponsiveInputWithLabel,
Expand Down
65 changes: 30 additions & 35 deletions ui/src/pages/Generator/Data/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const DataGenerator: React.FC = () => {
</div>

<ResponsiveButton
disabled={tableName && colNum > 0 ? false : true}
disabled={!tableName || colNum <= 0}
onClick={onButtonClick}
>
Generate
Expand All @@ -220,41 +220,36 @@ const DataGenerator: React.FC = () => {
{result.length > 0 ? (
<Card>
<div className={style.dg__right}>
<>
<Space>
<ResponsiveButton
onClick={() => {
downloadTextFile(
result,
"data.sql"
);
}}
>
Download SQL
</ResponsiveButton>
<ResponsiveButton
onClick={() => {
downloadTextFile(
convertToJSON(
colNames,
rowNum,
result
),
"data.json"
);
}}
>
Download JSON
</ResponsiveButton>
<ResponsiveButton
onClick={() => clipboard.copy(result)}
>
{clipboard.copied ? "Copied" : "Copy"}
</ResponsiveButton>
</Space>
<Space>
<ResponsiveButton
onClick={() => {
downloadTextFile(result, "data.sql");
}}
>
Download SQL
</ResponsiveButton>
<ResponsiveButton
onClick={() => {
downloadTextFile(
convertToJSON(
colNames,
rowNum,
result
),
"data.json"
);
}}
>
Download JSON
</ResponsiveButton>
<ResponsiveButton
onClick={() => clipboard.copy(result)}
>
{clipboard.copied ? "Copied" : "Copy"}
</ResponsiveButton>
</Space>

<Output sql={result} json="" />
</>
<Output sql={result} json="" />
</div>
</Card>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const MimeSearchResult: React.FC<MimeSearchResultProps> = ({
? filteredMimeType(data, searchQuery)
: data
: [];

return (
<Card>
<MimeSearch />
Expand Down
Empty file.
4 changes: 1 addition & 3 deletions ui/src/pages/Markdown/Docs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";

import styles from "./Docs.module.scss";

const Docs: React.FC = () => {
return <div className={styles.root}></div>;
return <div></div>;
};

export default Docs;

0 comments on commit bcb5cdb

Please sign in to comment.