Skip to content

Commit

Permalink
pnpm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Apr 3, 2024
1 parent af84389 commit af584fe
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
17 changes: 14 additions & 3 deletions frontend/pages/Home/Show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ import { DefinitionSources } from './components/DefinitionSources'

export const Show: React.FC = () => {
const [selectedDefinitionIds, setSelectedDefinitionIds] = useBitIdHash()
const [graphOptions, setGraphOptions] = useLocalStorage<GraphOptions>('HomeShow-GraphOptions', { compound: false, concentrate: false })
const { data: combinedDefinition, isLoading } = useCombinedDefinition(selectedDefinitionIds, graphOptions.compound, graphOptions.concentrate)
const [graphOptions, setGraphOptions] = useLocalStorage<GraphOptions>('HomeShow-GraphOptions', {
compound: false,
concentrate: false,
})
const { data: combinedDefinition, isLoading } = useCombinedDefinition(
selectedDefinitionIds,
graphOptions.compound,
graphOptions.concentrate,
)

return (
<Wrapper>
Expand All @@ -34,7 +41,11 @@ export const Show: React.FC = () => {
</CenterStack>
) : (
<StyledStack>
<DefinitionGraph combinedDefinition={combinedDefinition} graphOptions={graphOptions} setGraphOptions={setGraphOptions} />
<DefinitionGraph
combinedDefinition={combinedDefinition}
graphOptions={graphOptions}
setGraphOptions={setGraphOptions}
/>
<StyledDefinitionSources combinedDefinition={combinedDefinition} />
</StyledStack>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@ type Props = {
setGraphOptions: React.Dispatch<React.SetStateAction<GraphOptions>>
}

export const ConfigureViewOptionsDialog: React.FC<Props> = ({
isOpen,
onClickClose,
graphOptions,
setGraphOptions,
}) => {
const [temporaryViewOptions, setTemporaryViewOptions] =
useState<GraphOptions>(graphOptions)
export const ConfigureViewOptionsDialog: React.FC<Props> = ({ isOpen, onClickClose, graphOptions, setGraphOptions }) => {
const [temporaryViewOptions, setTemporaryViewOptions] = useState<GraphOptions>(graphOptions)

const handleDialogClose = () => {
onClickClose()
Expand Down Expand Up @@ -73,7 +67,10 @@ export const ConfigureViewOptionsDialog: React.FC<Props> = ({
<CheckBox name="compound" onChange={onChangeCompound} checked={temporaryViewOptions.compound} />
</FormControl>

<FormControl title="Use edge concentrators" helpMessage="This merges multiedges into a single edge and causes partially parallel edges to share part of their paths.">
<FormControl
title="Use edge concentrators"
helpMessage="This merges multiedges into a single edge and causes partially parallel edges to share part of their paths."
>
<CheckBox name="compound" onChange={onChangeConcentrate} checked={temporaryViewOptions.concentrate} />
</FormControl>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/Home/components/DefinitionGraph/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DefinitionGraph } from './DefinitionGraph'
export type { GraphOptions } from "./ConfigureGraphOptionsDialog"
export type { GraphOptions } from './ConfigureGraphOptionsDialog'
4 changes: 2 additions & 2 deletions spec/diver_down/web/definition_to_dot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def build_definition(title: 'title', sources: [])
},
{
source_name: 'b.rb',
}
},
]
)

Expand All @@ -83,7 +83,7 @@ def build_definition(title: 'title', sources: [])
module_name: 'B',
},
],
}
},
]
)

Expand Down

0 comments on commit af584fe

Please sign in to comment.