Skip to content

Commit

Permalink
Fix: packages updated (#25)
Browse files Browse the repository at this point in the history
* paired with Zoe to get packages updated

* update package lock

* include test script for npm

* remove storybook

* added back noEmit flag

* fixed problems with run build

* wrap setState in array instead of array of setState

* don't use any type

* no any types

* remove any type
  • Loading branch information
mwkyuen authored Oct 5, 2023
1 parent 0ff0701 commit fc267e0
Show file tree
Hide file tree
Showing 13 changed files with 17,629 additions and 50,633 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ module.exports = {
rules: {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off'
},
}
36 changes: 0 additions & 36 deletions .storybook/main.js

This file was deleted.

49 changes: 0 additions & 49 deletions .storybook/preview.js

This file was deleted.

3 changes: 2 additions & 1 deletion Eplant/Eplant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ function EplantLayout() {
// Update the model when the activeId changes
React.useEffect(() => {
if (model.getNodeById(activeId)) model.doAction(Actions.selectTab(activeId))
else model.doAction(Actions.deselectTabset())
// TODO: Need to add back if using flex-layout from Alex's fork
// else model.doAction(Actions.deselectTabset())
}, [activeId, model])

// Add a new tab when there is a non-popout pane
Expand Down
2 changes: 1 addition & 1 deletion Eplant/UI/GeneticElementComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function GeneticElementComponent({

const [textScroll, setTextScroll] = useState<boolean>(false)

const textGroupRef = useRef<HTMLDivElement>()
const textGroupRef = useRef<HTMLDivElement>(null)
const textContainerRef = useRef<HTMLDivElement>()

const menuId = useId()
Expand Down
4 changes: 2 additions & 2 deletions Eplant/View/viewData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ export type UseViewDataType<T, S, A> = ViewDataType<T> & {
const viewDataAtoms: {
[key: string]: WritableAtom<
ViewDataType<unknown>,
React.SetStateAction<ViewDataType<unknown>>,
[React.SetStateAction<ViewDataType<unknown>>],
void
>
} = {}

const viewStateAtoms: {
[key: string]: WritableAtom<unknown, React.SetStateAction<unknown>, void>
[key: string]: WritableAtom<unknown, [React.SetStateAction<unknown>], void>
} = {}

function getViewAtom(key: string) {
Expand Down
2 changes: 1 addition & 1 deletion Eplant/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function RootApp() {
const [darkMode, setDarkMode] = useDarkMode()
return (
<React.StrictMode>
<Provider scope={eplantScope}>
<Provider>
<ThemeProvider theme={darkMode ? dark : light}>
<CssBaseline />
<BrowserRouter>
Expand Down
2 changes: 1 addition & 1 deletion Eplant/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function atomWithOptionalStorage<T>(
}

function useAtomReducer<T, A>(
atom: WritableAtom<T, React.SetStateAction<T>, void>,
atom: WritableAtom<T, [React.SetStateAction<T>], void>,
reducer: (x: T, action: A) => T
): (action: A) => void {
const setValue = useSetAtom(atom)
Expand Down
3 changes: 2 additions & 1 deletion Eplant/views/PublicationViewer/GeneRIFs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as React from 'react'
import { SearchBar } from './SearchBar'
import { GeneRIFsData } from './types'


const columns: GridColDef[] = [
{
field: 'annotation',
Expand All @@ -16,7 +17,7 @@ const columns: GridColDef[] = [
headerName: 'Link',
width: 130,
headerClassName: 'select-none',
renderCell: (params: GridRenderCellParams<string>) => (
renderCell: (params: GridRenderCellParams<{[key:string]: unknown}>) => (
<Button
href={params.value}
variant="outlined"
Expand Down
2 changes: 1 addition & 1 deletion Eplant/views/PublicationViewer/Publications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const columns: GridColDef[] = [
headerName: 'Link',
width: 130,
headerClassName: 'select-none',
renderCell: (params: GridRenderCellParams<string>) => (
renderCell: (params: GridRenderCellParams<{[key:string]: unknown}>) => (
<>
<a
href={params.value}
Expand Down
1 change: 0 additions & 1 deletion jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ module.exports = {
},
moduleNameMapper: {
'^@eplant/(.*)$': path.resolve(__dirname, 'Eplant/$1'),
'^@stories/(.*)$': path.resolve(__dirname, 'stories/$1'),
},
}
Loading

0 comments on commit fc267e0

Please sign in to comment.