Skip to content

Commit

Permalink
fix: Type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Dec 16, 2024
1 parent 3b3ce12 commit c9f5acd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 5 additions & 1 deletion app/configurator/components/layout-configurator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
DashboardTimeRangeFilter,
getChartConfig,
LayoutDashboard,
LayoutTextBlock,
ReactGridLayoutType,
} from "@/config-types";
import { LayoutAnnotator } from "@/configurator/components/annotators";
Expand Down Expand Up @@ -571,7 +572,10 @@ const LayoutBlocksConfigurator = () => {
<ControlSectionContent px="small" gap="none">
<div className={classes.root}>
{blocks
.filter((b) => b.type === "text")
.filter(
(block): block is LayoutTextBlock & { initialized: boolean } =>
block.type === "text"
)
.map((block) => (
<ControlTab
key={block.key}
Expand Down
3 changes: 0 additions & 3 deletions app/themes/federal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const theme = createTheme({
primary: {
light: "#d8e8ef",
main: "#006699",
// @ts-expect-error it works
hover: "#004B70",

Check failure on line 39 in app/themes/federal.tsx

View workflow job for this annotation

GitHub Actions / lint-typecheck-test

Object literal may only specify known properties, and 'hover' does not exist in type 'PaletteColorOptions'.
active: "#00334D",
disabled: "#599cbd",
Expand All @@ -47,15 +46,13 @@ export const theme = createTheme({
},
secondary: {
main: "#757575",
// @ts-expect-error it works
hover: "#616161",

Check failure on line 49 in app/themes/federal.tsx

View workflow job for this annotation

GitHub Actions / lint-typecheck-test

Object literal may only specify known properties, and 'hover' does not exist in type 'PaletteColorOptions'.
active: "#4F4F4F",
disabled: "#A5A5A5",
},
success: {
main: "#3c763d",
light: "#DFF0D8",
// @ts-expect-error it works
hover: "#3c763d",

Check failure on line 56 in app/themes/federal.tsx

View workflow job for this annotation

GitHub Actions / lint-typecheck-test

Object literal may only specify known properties, and 'hover' does not exist in type 'PaletteColorOptions'.
active: "#3c763d",
disabled: "#DFF0D8",
Expand Down
1 change: 0 additions & 1 deletion app/themes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ declare module "@mui/material" {
}

declare module "@mui/material" {
// @ts-expect-error it works
interface PaletteColorOptions {

Check failure on line 15 in app/themes/index.ts

View workflow job for this annotation

GitHub Actions / lint-typecheck-test

Duplicate identifier 'PaletteColorOptions'.
light?: string;
main: string;
Expand Down
5 changes: 3 additions & 2 deletions app/utils/use-screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ const makeScreenshot = async ({

switch (type) {
case "png": {
let arrayBuffer = Uint8Array.from(atob(dataUrl.split(",")[1]), (c) =>
c.charCodeAt(0)
let arrayBuffer: Uint8Array = Uint8Array.from(
atob(dataUrl.split(",")[1]),
(c) => c.charCodeAt(0)
);

pngMetadata?.forEach(({ key, value }) => {
Expand Down

0 comments on commit c9f5acd

Please sign in to comment.