Skip to content

Commit f35154e

Browse files
authored
Merge pull request #2281 from dxc-technology/Mil4n0r/code_cleanup
Dead code cleanup and improved consistency of code
2 parents 3f69c97 + 7d6206a commit f35154e

File tree

213 files changed

+3101
-3966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+3101
-3966
lines changed

apps/website/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

apps/website/pages/components/chip/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Code = () => {
77
return (
88
<>
99
<Head>
10-
<title>Chip Code — Halstack Design System</title>
10+
<title>Chip code — Halstack Design System</title>
1111
</Head>
1212
<ChipCodePage />
1313
</>

apps/website/pages/components/data-grid/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Code = () => {
77
return (
88
<>
99
<Head>
10-
<title>Data grid — Halstack Design System</title>
10+
<title>Data grid code — Halstack Design System</title>
1111
</Head>
1212
<DataGridCodePage />
1313
</>

apps/website/pages/components/date-input/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Code = () => {
77
return (
88
<>
99
<Head>
10-
<title>Date Input Code — Halstack Design System</title>
10+
<title>Date Input code — Halstack Design System</title>
1111
</Head>
1212
<DateInputCodePage />
1313
</>

apps/website/pages/components/dialog/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import DialogCodePage from "screens/components/dialog/code/DialogCodePage";
66
const Code = () => (
77
<>
88
<Head>
9-
<title>Dialog Code — Halstack Design System</title>
9+
<title>Dialog code — Halstack Design System</title>
1010
</Head>
1111
<DialogCodePage />
1212
</>

apps/website/pages/components/dropdown/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Code = () => {
77
return (
88
<>
99
<Head>
10-
<title>Dropdown Code — Halstack Design System</title>
10+
<title>Dropdown code — Halstack Design System</title>
1111
</Head>
1212
<DropdownCodePage />
1313
</>

apps/website/pages/components/file-input/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Code = () => {
77
return (
88
<>
99
<Head>
10-
<title>File Input Code — Halstack Design System</title>
10+
<title>File Input code — Halstack Design System</title>
1111
</Head>
1212
<FileInputCodePage />
1313
</>

apps/website/pages/components/paginator/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PaginatorCodePage from "screens/components/paginator/code/PaginatorCodePa
66
const Code = () => (
77
<>
88
<Head>
9-
<title>Paginator Code — Halstack Design System</title>
9+
<title>Paginator code — Halstack Design System</title>
1010
</Head>
1111
<PaginatorCodePage />
1212
</>

apps/website/pages/components/typography/code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import TypographyCodePage from "screens/components/typography/code/TypographyCod
66
const Code = () => (
77
<>
88
<Head>
9-
<title>Typography — Halstack Design System</title>
9+
<title>Typography code — Halstack Design System</title>
1010
</Head>
1111
<TypographyCodePage />
1212
</>

apps/website/screens/common/CodeBlock.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Code = styled.code`
1919
word-wrap: break-word;
2020
`;
2121

22-
export default function CodeBlock({ children }: { children: ReactNode }) {
22+
const CodeBlock = ({ children }: { children: ReactNode }) => {
2323
const [copyActionIsVisible, setCopyActionIsVisible] = useState(false);
2424
const [copied, setCopied] = useState(false);
2525

@@ -60,3 +60,5 @@ export default function CodeBlock({ children }: { children: ReactNode }) {
6060
</DxcFlex>
6161
);
6262
}
63+
64+
export default CodeBlock

0 commit comments

Comments
 (0)