chore: improve importing of some packages (#647)

* chore: improve importing of some packages

* fix: not same version for all dependencies

* fix: lint and format issue
This commit is contained in:
Meier Lukas
2024-06-10 21:26:39 +02:00
committed by GitHub
parent c627384c4b
commit 9cab001451
23 changed files with 242 additions and 119 deletions

View File

@@ -1,12 +1,12 @@
import { Button, Card, Center, Grid, Stack, Text } from "@mantine/core";
import { objectEntries } from "@homarr/common";
import type { WidgetKind } from "@homarr/definitions";
import { createModal } from "@homarr/modals";
import { useI18n } from "@homarr/translation/client";
import { widgetImports } from "@homarr/widgets";
import type { WidgetDefinition } from "@homarr/widgets";
import { objectEntries } from "../../../../../../packages/common/src";
import { widgetImports } from "../../../../../../packages/widgets/src";
import type { WidgetDefinition } from "../../../../../../packages/widgets/src/definition";
import { useItemActions } from "./item-actions";
export const ItemSelectModal = createModal<void>(({ actions }) => {

View File

@@ -1,10 +1,9 @@
import { Button, Group, Stack, TextInput } from "@mantine/core";
import { boardSchemas } from "node_modules/@homarr/validation/src/board";
import { useZodForm } from "@homarr/form";
import { createModal } from "@homarr/modals";
import { useI18n } from "@homarr/translation/client";
import { z } from "@homarr/validation";
import { validation, z } from "@homarr/validation";
import { createCustomErrorParams } from "@homarr/validation/form";
interface InnerProps {
@@ -16,7 +15,7 @@ export const AddBoardModal = createModal<InnerProps>(({ actions, innerProps }) =
const t = useI18n();
const form = useZodForm(
z.object({
name: boardSchemas.byName.shape.name.refine((value) => !innerProps.boardNames.includes(value), {
name: validation.board.byName.shape.name.refine((value) => !innerProps.boardNames.includes(value), {
params: createCustomErrorParams("boardAlreadyExists"),
}),
}),