Skip to content

Commit

Permalink
Hide branch selector
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Oct 1, 2019
1 parent a3627a5 commit 4280306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
build
5 changes: 4 additions & 1 deletion src/components/views/TrackTopics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ function findNearbyTopics(topic: string, topics: ReadonlyArray<string>): Readonl
return NEARBY_TOPICS_CACHE[topic]
}

NEARBY_TOPICS_CACHE[topic] = topics.filter((potential) => levenshtein(topic, potential) < 5 || potential.split('_').indexOf(topic) !== -1 || topic.split('_').indexOf(potential) !== -1)
NEARBY_TOPICS_CACHE[topic] = topics.filter(
(potential) => levenshtein(topic, potential) < 5
|| potential.split('_').indexOf(topic) !== -1
|| topic.split('_').indexOf(potential) !== -1)
return NEARBY_TOPICS_CACHE[topic]
}
3 changes: 1 addition & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import './styles.css'

function App() {
const [selectedTrackId, doSelectTrack] = useTrack()
const [selectedBranch, doSelectBranch] = useBranch()
const [selectedBranch] = useBranch()
const [selectedView, doSelectView] = useView()

const doUnselectTrack = useCallback(() => doSelectTrack(null), [doSelectTrack])
Expand All @@ -26,7 +26,6 @@ function App() {
return (
<div className="app container">
<React.Fragment>
<BranchSelector selected={selectedBranch} onSelect={doSelectBranch} />
<ProvideBranch value={selectedBranch}>
<TrackTool
trackId={selectedTrackId}
Expand Down

0 comments on commit 4280306

Please sign in to comment.