Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

lint fix

AykutSarac5a3c6e2fc73f
diff --git a/.prettierrc b/.prettierrc
index 2e798406..a056ce73 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -7,8 +7,9 @@
"importOrder": [
"^(react/(.*)$)|^(react$)",
"^(next/(.*)$)|^(next$)",
+ "styled",
"<THIRD_PARTY_MODULES>",
- "^components/(.*)$",
+ "^src/(.*)$",
"^utils/(.*)$",
"^assets/(.*)$",
"^[./]"
diff --git a/src/components/CustomNode/TextNode.tsx b/src/components/CustomNode/TextNode.tsx
index f814daab..441eb073 100644
--- a/src/components/CustomNode/TextNode.tsx
+++ b/src/components/CustomNode/TextNode.tsx
@@ -1,9 +1,9 @@
import React from "react";
+import styled from "styled-components";
import { MdLink, MdLinkOff } from "react-icons/md";
import { CustomNodeProps } from "src/components/CustomNode";
import useGraph from "src/store/useGraph";
import useStored from "src/store/useStored";
-import styled from "styled-components";
import * as Styled from "./styles";
const StyledExpand = styled.button`
diff --git a/src/components/CustomNode/styles.tsx b/src/components/CustomNode/styles.tsx
index 456758e1..0aa97211 100644
--- a/src/components/CustomNode/styles.tsx
+++ b/src/components/CustomNode/styles.tsx
@@ -1,6 +1,6 @@
import { Roboto_Mono } from "next/font/google";
-import { LinkItUrl } from "react-linkify-it";
import styled, { DefaultTheme } from "styled-components";
+import { LinkItUrl } from "react-linkify-it";
const robotoMono = Roboto_Mono({
weight: "500",
diff --git a/src/components/ErrorContainer/index.tsx b/src/components/ErrorContainer/index.tsx
index 13cbbc48..e221b406 100644
--- a/src/components/ErrorContainer/index.tsx
+++ b/src/components/ErrorContainer/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
+import styled from "styled-components";
import { MdReportGmailerrorred, MdOutlineCheckCircleOutline } from "react-icons/md";
import useJson from "src/store/useJson";
-import styled from "styled-components";
const StyledErrorWrapper = styled.div`
z-index: 1;
diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx
index 80b5fe15..642df3ea 100644
--- a/src/components/Footer/index.tsx
+++ b/src/components/Footer/index.tsx
@@ -1,6 +1,6 @@
import Link from "next/link";
-import { FaDiscord, FaGithub, FaLinkedin, FaTwitter } from "react-icons/fa";
import styled from "styled-components";
+import { FaDiscord, FaGithub, FaLinkedin, FaTwitter } from "react-icons/fa";
import pkg from "../../../package.json";
export const StyledFooter = styled.footer`
diff --git a/src/components/Graph/PremiumView.tsx b/src/components/Graph/PremiumView.tsx
index d8fbf7d9..c81d6d56 100644
--- a/src/components/Graph/PremiumView.tsx
+++ b/src/components/Graph/PremiumView.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { Button } from "@mantine/core";
import styled from "styled-components";
+import { Button } from "@mantine/core";
const StyledPremiumView = styled.div`
display: flex;
diff --git a/src/components/Graph/index.tsx b/src/components/Graph/index.tsx
index fd1069b1..ce44ef3a 100644
--- a/src/components/Graph/index.tsx
+++ b/src/components/Graph/index.tsx
@@ -1,10 +1,10 @@
import React from "react";
+import styled from "styled-components";
import { ReactZoomPanPinchRef, TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
import { Canvas, Edge, EdgeProps, ElkRoot, NodeProps } from "reaflow";
import { CustomNode } from "src/components/CustomNode";
import useGraph from "src/store/useGraph";
import useUser from "src/store/useUser";
-import styled from "styled-components";
import { Loading } from "../Loading";
import { ErrorView } from "./ErrorView";
import { PremiumView } from "./PremiumView";
diff --git a/src/components/Loading/index.tsx b/src/components/Loading/index.tsx
index 6b3588ec..bc6d362c 100644
--- a/src/components/Loading/index.tsx
+++ b/src/components/Loading/index.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { Center, Image, Stack, Title } from "@mantine/core";
import styled, { keyframes } from "styled-components";
+import { Center, Image, Stack, Title } from "@mantine/core";
interface LoadingProps {
loading?: boolean;
diff --git a/src/components/MonacoEditor/index.tsx b/src/components/MonacoEditor/index.tsx
index 626c66b1..c8096651 100644
--- a/src/components/MonacoEditor/index.tsx
+++ b/src/components/MonacoEditor/index.tsx
@@ -1,10 +1,10 @@
import React from "react";
+import styled from "styled-components";
import Editor, { loader, Monaco } from "@monaco-editor/react";
import debounce from "lodash.debounce";
import { Loading } from "src/components/Loading";
import useJson from "src/store/useJson";
import useStored from "src/store/useStored";
-import styled from "styled-components";
loader.config({
paths: {
diff --git a/src/components/SearchInput/index.tsx b/src/components/SearchInput/index.tsx
index fded788c..2de24686 100644
--- a/src/components/SearchInput/index.tsx
+++ b/src/components/SearchInput/index.tsx
@@ -1,8 +1,8 @@
import React from "react";
+import styled from "styled-components";
import { AiOutlineSearch } from "react-icons/ai";
import { IoCloseSharp } from "react-icons/io5";
import { useFocusNode } from "src/hooks/useFocusNode";
-import styled from "styled-components";
const StyledInputWrapper = styled.div`
display: flex;
diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx
index 6b2c1682..52d86ba1 100644
--- a/src/components/Sidebar/index.tsx
+++ b/src/components/Sidebar/index.tsx
@@ -1,4 +1,5 @@
import React from "react";
+import styled from "styled-components";
import { Tooltip } from "@mantine/core";
import toast from "react-hot-toast";
import { AiOutlineDelete, AiOutlineSave, AiOutlineFileAdd, AiOutlineEdit } from "react-icons/ai";
@@ -15,7 +16,6 @@ import useGraph from "src/store/useGraph";
import useJson from "src/store/useJson";
import useModal from "src/store/useModal";
import { getNextDirection } from "src/utils/getNextDirection";
-import styled from "styled-components";
const StyledSidebar = styled.div`
display: flex;
diff --git a/src/components/Sponsors/index.tsx b/src/components/Sponsors/index.tsx
index f6597357..2028643a 100644
--- a/src/components/Sponsors/index.tsx
+++ b/src/components/Sponsors/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
+import styled from "styled-components";
import { Avatar, Tooltip, UnstyledButton } from "@mantine/core";
import useStored from "src/store/useStored";
-import styled from "styled-components";
async function getSponsors() {
try {
diff --git a/src/components/SupportButton/index.tsx b/src/components/SupportButton/index.tsx
index 819643b4..b36769ef 100644
--- a/src/components/SupportButton/index.tsx
+++ b/src/components/SupportButton/index.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { HiHeart } from "react-icons/hi";
import styled from "styled-components";
+import { HiHeart } from "react-icons/hi";
const StyledText = styled.span`
white-space: nowrap;
diff --git a/src/containers/Editor/BottomBar.tsx b/src/containers/Editor/BottomBar.tsx
index edc8cf88..97f52a0d 100644
--- a/src/containers/Editor/BottomBar.tsx
+++ b/src/containers/Editor/BottomBar.tsx
@@ -1,6 +1,7 @@
import React from "react";
import Head from "next/head";
import { useRouter } from "next/router";
+import styled from "styled-components";
import toast from "react-hot-toast";
import {
AiOutlineCloudSync,
@@ -15,7 +16,6 @@ import useJson from "src/store/useJson";
import useModal from "src/store/useModal";
import useStored from "src/store/useStored";
import useUser from "src/store/useUser";
-import styled from "styled-components";
const StyledBottomBar = styled.div`
display: flex;
diff --git a/src/containers/Editor/JsonEditor/index.tsx b/src/containers/Editor/JsonEditor/index.tsx
index 4cfc49ab..5a839f27 100644
--- a/src/containers/Editor/JsonEditor/index.tsx
+++ b/src/containers/Editor/JsonEditor/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
+import styled from "styled-components";
import { ErrorContainer } from "src/components/ErrorContainer";
import { MonacoEditor } from "src/components/MonacoEditor";
-import styled from "styled-components";
const StyledEditorWrapper = styled.div`
display: flex;
diff --git a/src/containers/Editor/LiveEditor/Tools.tsx b/src/containers/Editor/LiveEditor/Tools.tsx
index a0a05e34..2ccf2c7a 100644
--- a/src/containers/Editor/LiveEditor/Tools.tsx
+++ b/src/containers/Editor/LiveEditor/Tools.tsx
@@ -1,11 +1,11 @@
import React from "react";
+import styled from "styled-components";
import { AiOutlineFullscreen, AiOutlineMinus, AiOutlinePlus } from "react-icons/ai";
import { FiDownload } from "react-icons/fi";
import { MdCenterFocusWeak } from "react-icons/md";
import { SearchInput } from "src/components/SearchInput";
import useGraph from "src/store/useGraph";
import useModal from "src/store/useModal";
-import styled from "styled-components";
export const StyledTools = styled.div`
position: relative;
diff --git a/src/containers/Editor/LiveEditor/index.tsx b/src/containers/Editor/LiveEditor/index.tsx
index e9c9f73a..793393c5 100644
--- a/src/containers/Editor/LiveEditor/index.tsx
+++ b/src/containers/Editor/LiveEditor/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
+import styled from "styled-components";
import { GraphCanvas } from "src/containers/Editor/LiveEditor/GraphCanvas";
import { Tools } from "src/containers/Editor/LiveEditor/Tools";
-import styled from "styled-components";
const StyledLiveEditor = styled.div`
position: relative;
diff --git a/src/containers/Editor/Panes.tsx b/src/containers/Editor/Panes.tsx
index f3a30222..154f16ff 100644
--- a/src/containers/Editor/Panes.tsx
+++ b/src/containers/Editor/Panes.tsx
@@ -1,10 +1,10 @@
import React from "react";
import dynamic from "next/dynamic";
+import styled from "styled-components";
import { Allotment } from "allotment";
import "allotment/dist/style.css";
import { JsonEditor } from "src/containers/Editor/JsonEditor";
import useGraph from "src/store/useGraph";
-import styled from "styled-components";
export const StyledEditor = styled(Allotment)`
position: relative !important;
diff --git a/src/containers/ModalController/index.tsx b/src/containers/ModalController/index.tsx
index 14fd6e72..9488bf77 100644
--- a/src/containers/ModalController/index.tsx
+++ b/src/containers/ModalController/index.tsx
@@ -1,4 +1,5 @@
import React from "react";
+import { shallow } from "zustand/shallow";
import { AccountModal } from "src/containers/Modals/AccountModal";
import { ClearModal } from "src/containers/Modals/ClearModal";
import { CloudModal } from "src/containers/Modals/CloudModal";
@@ -8,7 +9,6 @@ import { LoginModal } from "src/containers/Modals/LoginModal";
import { SettingsModal } from "src/containers/Modals/SettingsModal";
import { ShareModal } from "src/containers/Modals/ShareModal";
import useModal from "src/store/useModal";
-import { shallow } from "zustand/shallow";
import { PremiumModal } from "../Modals/PremiumModal";
export const ModalController = () => {
diff --git a/src/containers/Modals/AccountModal/index.tsx b/src/containers/Modals/AccountModal/index.tsx
index eab77e4a..0d86a1e4 100644
--- a/src/containers/Modals/AccountModal/index.tsx
+++ b/src/containers/Modals/AccountModal/index.tsx
@@ -1,9 +1,9 @@
import React from "react";
import Link from "next/link";
+import styled from "styled-components";
import { Modal, Group, Button, Badge, Avatar, Grid, Divider, ModalProps } from "@mantine/core";
import { IoRocketSharp } from "react-icons/io5";
import useUser from "src/store/useUser";
-import styled from "styled-components";
const StyledTitle = styled.div`
display: flex;
diff --git a/src/containers/Modals/CloudModal/index.tsx b/src/containers/Modals/CloudModal/index.tsx
index db9f6e06..f25b862d 100644
--- a/src/containers/Modals/CloudModal/index.tsx
+++ b/src/containers/Modals/CloudModal/index.tsx
@@ -1,5 +1,6 @@
import React from "react";
import { useRouter } from "next/router";
+import styled from "styled-components";
import {
Modal,
Group,
@@ -23,7 +24,6 @@ import { deleteJson, getAllJson, saveJson, updateJson } from "src/services/db/js
import useJson from "src/store/useJson";
import useUser from "src/store/useUser";
import { Json } from "src/typings/altogic";
-import styled from "styled-components";
dayjs.extend(relativeTime);
diff --git a/src/containers/Modals/ImportModal/index.tsx b/src/containers/Modals/ImportModal/index.tsx
index c48427d9..da687598 100644
--- a/src/containers/Modals/ImportModal/index.tsx
+++ b/src/containers/Modals/ImportModal/index.tsx
@@ -1,9 +1,9 @@
import React from "react";
+import styled from "styled-components";
import { Modal, Group, Button, TextInput, Stack, Divider, ModalProps } from "@mantine/core";
import toast from "react-hot-toast";
import { AiOutlineUpload } from "react-icons/ai";
import useJson from "src/store/useJson";
-import styled from "styled-components";
const StyledUploadWrapper = styled.label`
display: flex;
diff --git a/src/containers/Modals/NodeModal/index.tsx b/src/containers/Modals/NodeModal/index.tsx
index 1caa89ae..53ff272d 100644
--- a/src/containers/Modals/NodeModal/index.tsx
+++ b/src/containers/Modals/NodeModal/index.tsx
@@ -1,9 +1,9 @@
import React from "react";
import { Modal, Stack, Text, ScrollArea, ModalProps } from "@mantine/core";
import { Prism } from "@mantine/prism";
+import { shallow } from "zustand/shallow";
import useGraph from "src/store/useGraph";
import { dataToString } from "src/utils/dataToString";
-import { shallow } from "zustand/shallow";
const CodeBlock: React.FC<{ children: any }> = ({ children }) => {
return (
diff --git a/src/containers/Modals/SettingsModal/index.tsx b/src/containers/Modals/SettingsModal/index.tsx
index 8ceb4115..d8f12572 100644
--- a/src/containers/Modals/SettingsModal/index.tsx
+++ b/src/containers/Modals/SettingsModal/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { Modal, Group, Switch, Stack, ModalProps } from "@mantine/core";
-import useStored from "src/store/useStored";
import { shallow } from "zustand/shallow";
+import useStored from "src/store/useStored";
export const SettingsModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const lightmode = useStored(state => state.lightmode);
diff --git a/src/containers/PricingCards/index.tsx b/src/containers/PricingCards/index.tsx
index 07cda945..8a276a20 100644
--- a/src/containers/PricingCards/index.tsx
+++ b/src/containers/PricingCards/index.tsx
@@ -1,6 +1,6 @@
import React from "react";
-import { Button } from "@mantine/core";
import styled from "styled-components";
+import { Button } from "@mantine/core";
const StyledSectionBody = styled.div`
display: grid;
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index 5246e70c..1db40788 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { useRouter } from "next/router";
-import { Button } from "@mantine/core";
import styled from "styled-components";
+import { Button } from "@mantine/core";
const StyledNotFound = styled.div`
display: flex;
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 15261599..303ee8ac 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -1,6 +1,7 @@
import React from "react";
import type { AppProps } from "next/app";
import localFont from "next/font/local";
+import { ThemeProvider } from "styled-components";
import { MantineProvider } from "@mantine/core";
import { init } from "@sentry/nextjs";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@@ -10,7 +11,6 @@ import GlobalStyle from "src/constants/globalStyle";
import { darkTheme, lightTheme } from "src/constants/theme";
import { ModalController } from "src/containers/ModalController";
import useStored from "src/store/useStored";
-import { ThemeProvider } from "styled-components";
if (process.env.NODE_ENV !== "development") {
init({
diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx
index 5246e70c..1db40788 100644
--- a/src/pages/_error.tsx
+++ b/src/pages/_error.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { useRouter } from "next/router";
-import { Button } from "@mantine/core";
import styled from "styled-components";
+import { Button } from "@mantine/core";
const StyledNotFound = styled.div`
display: flex;
diff --git a/src/pages/docs.tsx b/src/pages/docs.tsx
index 4a6c9738..c12ee29c 100644
--- a/src/pages/docs.tsx
+++ b/src/pages/docs.tsx
@@ -1,10 +1,10 @@
import React from "react";
import dynamic from "next/dynamic";
import Head from "next/head";
+import styled from "styled-components";
import { Button } from "@mantine/core";
import materialDark from "react-syntax-highlighter/dist/cjs/styles/prism/material-dark";
import { Footer } from "src/components/Footer";
-import styled from "styled-components";
const SyntaxHighlighter = dynamic(() => import("react-syntax-highlighter/dist/cjs/prism-async"), {
ssr: false,
diff --git a/src/pages/editor.tsx b/src/pages/editor.tsx
index 45a45873..8e010ef3 100644
--- a/src/pages/editor.tsx
+++ b/src/pages/editor.tsx
@@ -1,13 +1,13 @@
import React from "react";
import Head from "next/head";
import { useRouter } from "next/router";
+import styled from "styled-components";
import { Loading } from "src/components/Loading";
import { Sidebar } from "src/components/Sidebar";
import { BottomBar } from "src/containers/Editor/BottomBar";
import Panes from "src/containers/Editor/Panes";
import useJson from "src/store/useJson";
import useUser from "src/store/useUser";
-import styled from "styled-components";
export const StyledPageWrapper = styled.div`
display: flex;
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index a6663a8a..77e4288c 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
+import { ThemeProvider } from "styled-components";
import { darkTheme } from "src/constants/theme";
import Home from "src/containers/Home";
-import { ThemeProvider } from "styled-components";
const HomePage = () => {
return (
diff --git a/src/pages/pricing.tsx b/src/pages/pricing.tsx
index 420587e9..f228c8e9 100644
--- a/src/pages/pricing.tsx
+++ b/src/pages/pricing.tsx
@@ -1,8 +1,8 @@
import React from "react";
+import styled from "styled-components";
import { Button } from "@mantine/core";
import { Footer } from "src/components/Footer";
import { PricingCards } from "src/containers/PricingCards";
-import styled from "styled-components";
const StyledPageWrapper = styled.div`
padding: 5%;
diff --git a/src/pages/sign-in.tsx b/src/pages/sign-in.tsx
index 6a8a48c1..d4a35e46 100644
--- a/src/pages/sign-in.tsx
+++ b/src/pages/sign-in.tsx
@@ -2,13 +2,13 @@ import React from "react";
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
+import styled from "styled-components";
import { Button, Center, Container, Stack } from "@mantine/core";
import { AiOutlineGithub, AiOutlineGoogle } from "react-icons/ai";
import { altogic } from "src/api/altogic";
import { Footer } from "src/components/Footer";
import { Navbar } from "src/components/Navbar";
import useUser from "src/store/useUser";
-import styled from "styled-components";
const StyledPageWrapper = styled.div`
padding: 5%;
diff --git a/src/pages/widget.tsx b/src/pages/widget.tsx
index 61b07b59..17a4fed0 100644
--- a/src/pages/widget.tsx
+++ b/src/pages/widget.tsx
@@ -1,6 +1,7 @@
import React from "react";
import dynamic from "next/dynamic";
import { useRouter } from "next/router";
+import styled, { ThemeProvider } from "styled-components";
import toast from "react-hot-toast";
import { baseURL } from "src/constants/data";
import { darkTheme, lightTheme } from "src/constants/theme";
@@ -8,7 +9,6 @@ import { Tools } from "src/containers/Editor/LiveEditor/Tools";
import { getPartnerStatus } from "src/services/db/widget";
import useGraph from "src/store/useGraph";
import useJson from "src/store/useJson";
-import styled, { ThemeProvider } from "styled-components";
const GraphCanvas = dynamic(
() => import("src/containers/Editor/LiveEditor/GraphCanvas").then(c => c.GraphCanvas),
diff --git a/src/store/useGraph.tsx b/src/store/useGraph.tsx
index 34ab9a1e..b8d40201 100644
--- a/src/store/useGraph.tsx
+++ b/src/store/useGraph.tsx
@@ -1,9 +1,9 @@
import { ReactZoomPanPinchRef } from "react-zoom-pan-pinch";
import { CanvasDirection } from "reaflow/dist/layout/elkLayout";
+import { create } from "zustand";
import { parser } from "src/utils/core/jsonParser";
import { getChildrenEdges } from "src/utils/getChildrenEdges";
import { getOutgoers } from "src/utils/getOutgoers";
-import { create } from "zustand";
import useJson from "./useJson";
const initialStates = {
diff --git a/src/store/useJson.tsx b/src/store/useJson.tsx
index 2f89f3ba..bb2d4fb6 100644
--- a/src/store/useJson.tsx
+++ b/src/store/useJson.tsx
@@ -1,11 +1,11 @@
import { decompressFromBase64 } from "lz-string";
import toast from "react-hot-toast";
+import { create } from "zustand";
import { altogic } from "src/api/altogic";
import { defaultJson } from "src/constants/data";
import { saveJson as saveJsonDB } from "src/services/db/json";
import useGraph from "src/store/useGraph";
import { Json } from "src/typings/altogic";
-import { create } from "zustand";
interface JsonActions {
setJson: (json: string) => void;
diff --git a/src/store/useUser.tsx b/src/store/useUser.tsx
index 1a7a3f31..6e90e70c 100644
--- a/src/store/useUser.tsx
+++ b/src/store/useUser.tsx
@@ -1,7 +1,7 @@
import toast from "react-hot-toast";
+import { create } from "zustand";
import { altogic } from "src/api/altogic";
import { AltogicAuth, User } from "src/typings/altogic";
-import { create } from "zustand";
import useModal from "./useModal";
interface UserActions {
@@ -51,29 +51,28 @@ const useUser = create<UserStates & UserActions>()((set, get) => ({
}
},
checkSession: async () => {
- if (process.env.NODE_ENV === "development") {
- return set({
- user: {
- _id: "0",
- provider: "altogic",
- providerUserId: "1",
- email: "[email protected]",
- name: "JSON Crack",
- profilePicture: "",
- signUpAt: "2022-12-04T11:07:32.000Z",
- lastLoginAt: "2023-03-12T14:17:03.146Z",
- type: 1,
- updatedAt: "2022-12-30T10:56:29.772Z",
- },
- isAuthenticated: true,
- });
- }
+ // if (process.env.NODE_ENV === "development") {
+ // return set({
+ // user: {
+ // _id: "0",
+ // provider: "altogic",
+ // providerUserId: "1",
+ // email: "[email protected]",
+ // name: "JSON Crack",
+ // profilePicture: "",
+ // signUpAt: "2022-12-04T11:07:32.000Z",
+ // lastLoginAt: "2023-03-12T14:17:03.146Z",
+ // type: 1,
+ // updatedAt: "2022-12-30T10:56:29.772Z",
+ // },
+ // isAuthenticated: true,
+ // });
+ // }
const currentSession = altogic.auth.getSession();
if (currentSession) {
const dbUser = await altogic.auth.getUserFromDB();
- console.log(dbUser);
altogic.auth.setSession(currentSession);
set({ user: dbUser.user as any, isAuthenticated: true });
diff --git a/src/typings/styled.d.ts b/src/typings/styled.d.ts
index 6e6fea21..8d343a64 100644
--- a/src/typings/styled.d.ts
+++ b/src/typings/styled.d.ts
@@ -1,5 +1,5 @@
-import theme from "src/constants/theme";
import "styled-components";
+import theme from "src/constants/theme";
type CustomTheme = typeof theme;