Skip to content

Commit

Permalink
fix: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceyyu committed Oct 4, 2023
1 parent 5fa8d12 commit 56ff805
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion web_app/src/components/codeExportModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface ICodeExport {

const downloadFile = (data: string) => {
const fileName = "config";
const json = data
const json = data;
const blob = new Blob([json], { type: "application/json" });
const href = URL.createObjectURL(blob);
const link = document.createElement("a");
Expand Down
16 changes: 8 additions & 8 deletions web_app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import type { IDataSetInfo, IMutField, IRow, IVisSpec } from "@kanaries/graphic-
import type { IStoInfo } from "@kanaries/graphic-walker/dist/utils/save";
import { getExportTool } from "./tools/exportTool";
import CodeExportModal from "./components/codeExportModal";
import { StyleSheetManager } from 'styled-components';
import tailwindStyle from 'tailwindcss/tailwind.css?inline'
import { StyleSheetManager } from "styled-components";
import tailwindStyle from "tailwindcss/tailwind.css?inline";

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const App: React.FC<IAppProps> = observer((propsIn) => {
Expand Down Expand Up @@ -39,7 +39,7 @@ const App: React.FC<IAppProps> = observer((propsIn) => {
},
],
specList,
} as IStoInfo)
} as IStoInfo);
}, 1);
} else {
storeRef?.current?.commonStore?.updateTempSTDDS({
Expand All @@ -49,10 +49,10 @@ const App: React.FC<IAppProps> = observer((propsIn) => {
} as IDataSetInfo);
storeRef?.current?.commonStore?.commitTempDS();
}
}
};

React.useEffect(() => {
setData(dataSource, props.rawFields)
setData(dataSource, props.rawFields);
}, []);

const exportTool = getExportTool(setExportOpen);
Expand All @@ -66,7 +66,7 @@ const App: React.FC<IAppProps> = observer((propsIn) => {
return (
<React.StrictMode>
<div className="h-full w-full overflow-y-scroll font-sans">
{/* <div style={{ height: "100%", width: "100%", overflowY: "scroll" }}> */}
{/* <div style={{ height: "100%", width: "100%", overflowY: "scroll" }}> */}
<CodeExportModal open={exportOpen} setOpen={setExportOpen} globalStore={storeRef} />
<GraphicWalker {...props} storeRef={storeRef} toolbar={toolbarConfig} />
</div>
Expand All @@ -77,10 +77,10 @@ const App: React.FC<IAppProps> = observer((propsIn) => {
const GWalker = (props: IAppProps, id: string) => {
const container = document.getElementById(id);
if (container) {
const shadowRoot = container.attachShadow({ mode: 'open' });
const shadowRoot = container.attachShadow({ mode: "open" });

// Add Tailwind CSS to the shadow root
const styleElement = document.createElement('style');
const styleElement = document.createElement("style");
styleElement.textContent = tailwindStyle;
shadowRoot.appendChild(styleElement);

Expand Down
4 changes: 2 additions & 2 deletions web_app/src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IGWProps } from '@kanaries/graphic-walker/dist/App'
import type { IGWProps } from "@kanaries/graphic-walker/dist/App";

export interface IAppProps extends IGWProps {
id: string;
Expand All @@ -8,4 +8,4 @@ export interface IAppProps extends IGWProps {
env?: string;
needLoadDatas?: boolean;
specType?: string;
}
}

0 comments on commit 56ff805

Please sign in to comment.