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.

fix more ts errors and linter

Oleg Isonena6ee6db21e09
diff --git a/app/routes/auth/dev.tsx b/app/routes/auth/dev.tsx
index d2a7f6e090..c2791ca2a6 100644
--- a/app/routes/auth/dev.tsx
+++ b/app/routes/auth/dev.tsx
@@ -1,7 +1,7 @@
import { ActionFunction, redirect } from "@remix-run/node";
import config from "~/config";
import { authenticator } from "~/services/auth.server";
-import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";
+import { AUTH_PROVIDERS } from "~/shared/session";
export default function Dev() {
return null;
diff --git a/app/routes/auth/github.tsx b/app/routes/auth/github.tsx
index a907ce7143..4754126d46 100644
--- a/app/routes/auth/github.tsx
+++ b/app/routes/auth/github.tsx
@@ -2,8 +2,7 @@ import { ActionFunction, redirect } from "@remix-run/node";
import config from "~/config";
import { authenticator } from "~/services/auth.server";
import { sentryException } from "~/shared/sentry";
-import { ensureUserCookie } from "~/shared/session";
-import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";
+import { ensureUserCookie, AUTH_PROVIDERS } from "~/shared/session";
export default function GH() {
return null;
diff --git a/app/routes/auth/github/callback.tsx b/app/routes/auth/github/callback.tsx
index f3643ac55f..92660d1b78 100644
--- a/app/routes/auth/github/callback.tsx
+++ b/app/routes/auth/github/callback.tsx
@@ -1,8 +1,7 @@
import { LoaderFunction, redirect } from "@remix-run/node";
import config from "~/config";
import { authenticator } from "~/services/auth.server";
-import { ensureUserCookie } from "~/shared/session";
-import { AUTH_PROVIDERS } from "~/shared/session/useLoginErrorMessage";
+import { ensureUserCookie, AUTH_PROVIDERS } from "~/shared/session";
export const loader: LoaderFunction = async ({ request }) => {
const { userId } = await ensureUserCookie(request);
diff --git a/app/routes/auth/google.tsx b/app/routes/auth/google.tsx
index 7471cc0fdc..f04c3f8ff8 100644
--- a/app/routes/auth/google.tsx
+++ b/app/routes/auth/google.tsx
@@ -2,8 +2,7 @@ import { ActionFunction, LoaderFunction, redirect } from "@remix-run/node";
import config from "~/config";
import { authenticator } from "~/services/auth.server";
import { sentryException } from "~/shared/sentry";
-import { ensureUserCookie } from "~/shared/session";
-import { AUTH_PROVIDERS } from "~/shared/session/useLoginErrorMessage";
+import { ensureUserCookie, AUTH_PROVIDERS } from "~/shared/session";
export default function Google() {
return null;
diff --git a/app/routes/login/index.tsx b/app/routes/login/index.tsx
index 77d7e926a5..0b6a9b438e 100644
--- a/app/routes/login/index.tsx
+++ b/app/routes/login/index.tsx
@@ -4,8 +4,8 @@ import { authenticator } from "~/services/auth.server";
import config from "~/config";
import env from "~/env.server";
-import { Login, links } from "~/auth/";
-import { useLoginErrorMessage } from "~/shared/session/useLoginErrorMessage";
+import { Login, links } from "~/auth";
+import { useLoginErrorMessage } from "~/shared/session";
export { links };
diff --git a/app/services/auth.server.ts b/app/services/auth.server.ts
index 0760b76222..fcad2e1beb 100644
--- a/app/services/auth.server.ts
+++ b/app/services/auth.server.ts
@@ -11,7 +11,7 @@ import {
createOrLoginWithGoogle,
} from "~/shared/db/user.server";
import { sentryException } from "~/shared/sentry";
-import { AUTH_PROVIDERS } from "~/shared/session/use-login-error-message";
+import { AUTH_PROVIDERS } from "~/shared/session";
const url = `${
process.env.VERCEL_URL
diff --git a/app/shared/session/index.ts b/app/shared/session/index.ts
index 9d23682347..d3127eaa39 100644
--- a/app/shared/session/index.ts
+++ b/app/shared/session/index.ts
@@ -1 +1,2 @@
export * from "./user.server";
+export * from "./use-login-error-message";
diff --git a/app/shared/text-editor/example-text-editor.stories.tsx b/app/shared/text-editor/example-text-editor.stories.tsx
index 20c95f67b5..6247876973 100644
--- a/app/shared/text-editor/example-text-editor.stories.tsx
+++ b/app/shared/text-editor/example-text-editor.stories.tsx
@@ -1,14 +1,6 @@
-import React from "react";
import type { ComponentStory, ComponentMeta } from "@storybook/react";
import { ExampleTextEditor } from "./example-text-editor";
import "./styles.css";
-import { $getRoot, $getSelection, type EditorState } from "./lexical";
-
-// When the editor changes, you can get notified via the
-// LexicalOnChangePlugin!
-const onChange = (editorState: EditorState) => {
- editorState.read(() => {});
-};
export default {
title: "Text Editor",
@@ -20,6 +12,4 @@ const Template: ComponentStory<typeof ExampleTextEditor> = (args) => {
};
export const TextEditor = Template.bind({});
-TextEditor.args = {
- onChange,
-};
+TextEditor.args = {};