Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

remove dead code, some types

Sultan46e8c80f55ad
diff --git a/apps/designer/app/designer/features/style-panel/style-section.tsx b/apps/designer/app/designer/features/style-panel/style-section.tsx
index 9dff976c54..dabe7ec75f 100644
--- a/apps/designer/app/designer/features/style-panel/style-section.tsx
+++ b/apps/designer/app/designer/features/style-panel/style-section.tsx
@@ -306,12 +306,6 @@ const ComboiconControl = ({
const setValue = setProperty(styleConfig.property);
const currentValue = value.value as string;
- const direction = (currentStyle.direction?.value as string).includes(
- "column"
- );
- const orientation = (currentStyle.direction?.value as string).includes(
- "reverse"
- );
return (
<Comboicon
items={styleConfig.items}
@@ -347,7 +341,7 @@ const GridControl = ({
const flexDirection = currentStyle.flexDirection?.value as string;
const justifyContent = currentStyle.justifyContent?.value as string;
const alignItems = currentStyle.alignItems?.value as string;
- const alignContent = currentStyle.alignContent?.value as string;
+ // const alignContent = currentStyle.alignContent?.value as string;
const direction = Number(flexDirection.includes("column"));
const orientation = Number(flexDirection.includes("reverse"));
@@ -357,10 +351,6 @@ const GridControl = ({
justifyContent
] as number;
const [position, setPosition] = useState(row * 3 + column);
- {
- const [position, setPosition] = useState(row * 3 + column);
- console.log(alignItems, justifyContent, row, column, position);
- }
return (
<Grid
css={{
diff --git a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
index cf36b13909..bf36c3eeec 100644
--- a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
+++ b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
@@ -1,11 +1,6 @@
import { createValueContainer, useValue } from "react-nano-state";
import { Box, Flex, Text, Collapsible } from "~/shared/design-system";
-import {
- PlusIcon,
- MinusIcon,
- ChevronRightIcon,
- ChevronLeftIcon,
-} from "~/shared/icons";
+import { ChevronRightIcon, ChevronLeftIcon } from "~/shared/icons";
type CollapsibleSectionProps = {
label: string;
diff --git a/apps/designer/app/shared/design-system/components/comboicon.tsx b/apps/designer/app/shared/design-system/components/comboicon.tsx
index 79b579d8e5..aa543bbefc 100644
--- a/apps/designer/app/shared/design-system/components/comboicon.tsx
+++ b/apps/designer/app/shared/design-system/components/comboicon.tsx
@@ -94,7 +94,7 @@ export const Comboicon = ({
value: string;
items: Array<{ label: string; name: string }>;
onChange: (value: string) => void;
- icons?: Record<string, Function>;
+ icons?: Record<string, (props: unknown) => JSX.Element>;
css: CSS;
}) => {
const TriggerIcon = icons?.[value];
@@ -110,13 +110,14 @@ export const Comboicon = ({
onValueChange={onChange}
>
{items
- .map(({ name, label }: any) => ({
+ .map(({ name, label }: { name: string; label: string }) => ({
icon: icons?.[name],
name,
label,
}))
- .filter(({ icon }: any) => Boolean(icon))
- .map(({ name, label, icon: ItemIcon }: any) => {
+ .filter(({ icon }) => Boolean(icon))
+ .map(({ name, label, icon }) => {
+ const ItemIcon = icon as (props: unknown) => JSX.Element;
return (
<StyledRadioItem key={name} value={label}>
<StyledItemIndicator>