-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add /tree-debug page to help debug auspice entropy panel
- Loading branch information
1 parent
0b7468b
commit 1b7917a
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { AuspiceJsonV2 } from 'auspice' | ||
import { changeColorBy } from 'auspice/src/actions/colors' | ||
import React from 'react' | ||
import dynamic from 'next/dynamic' | ||
import { useDispatch } from 'react-redux' | ||
import { Layout } from 'src/components/Layout/Layout' | ||
import { LOADING } from 'src/components/Loading/Loading' | ||
import { useAxiosQuery } from 'src/helpers/useAxiosQuery' | ||
import { auspiceStartClean } from 'src/state/auspice/auspice.actions' | ||
import { createAuspiceState } from 'src/state/auspice/createAuspiceState' | ||
|
||
const TreePageContent = dynamic(() => import('src/components/Tree/TreePageContent'), { | ||
ssr: false, | ||
loading() { | ||
// eslint-disable-next-line react/jsx-no-useless-fragment | ||
return <>{LOADING}</> | ||
}, | ||
}) | ||
|
||
export default function TreePage() { | ||
const auspiceJson: AuspiceJsonV2 = useAxiosQuery( | ||
'https://raw.githubusercontent.com/nextstrain/nextclade_data/refs/heads/master/data/nextstrain/sars-cov-2/wuhan-hu-1/orfs/tree.json', | ||
) | ||
|
||
const dispatch = useDispatch() | ||
const auspiceState = createAuspiceState(auspiceJson, dispatch) | ||
dispatch(auspiceStartClean(auspiceState)) | ||
dispatch(changeColorBy()) | ||
// dispatch(treeFilterByNodeType(['New'])) | ||
|
||
return ( | ||
<Layout> | ||
<TreePageContent /> | ||
</Layout> | ||
) | ||
} |