Skip to content

Commit

Permalink
simplify geoda wasm call
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Dec 9, 2024
1 parent 65c83cf commit 39a154c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 47 deletions.
8 changes: 4 additions & 4 deletions geoda-ai/src/app/preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import ThemeProviderWrapper from '@/components/theme-provider-wrapper';
import {useSearchParams} from 'next/navigation';
import dynamic from 'next/dynamic';
import {DuckDB} from '@/hooks/use-duckdb';
import {useGeoDa} from '@/hooks/use-geoda';
import {GeoDaLogo} from '@/components/navigator/geoda-logo';
import {initGeoDa} from 'geoda-wasm';
const MainConatiner = dynamic(() => import('@/components/main-container'), {ssr: false});
// import MainConatiner from '@/components/main-container';

Expand All @@ -32,12 +32,12 @@ export default function Home() {
const [isDuckDBReady, setIsDuckDBReady] = useState(false);
const [showPulse, setShowPulse] = useState(false);

useGeoDa();

// Initialize DuckDB and set ready state
// Initialize DuckDB and GeoDa WASM and set ready state
useEffect(() => {
async function initDuckDB() {
await DuckDB.getInstance().initDuckDB();
// init GeoDa WASM
await initGeoDa();
setIsDuckDBReady(true);
}
initDuckDB();
Expand Down
43 changes: 0 additions & 43 deletions geoda-ai/src/hooks/use-geoda.ts

This file was deleted.

0 comments on commit 39a154c

Please sign in to comment.