Skip to content

Commit

Permalink
pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Feb 21, 2024
1 parent 9e03c57 commit ed58627
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/features/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ function App() {
const [query, setQuery] = React.useState('');

const branches = process.env.REACT_APP_BRANCHES!.split(',');
const defaultBranch = branches[0];
const desiredBranch = window.location.pathname.slice(1);
const defaultBranch = branches.includes(desiredBranch) ? desiredBranch : branches[0];
const [branch, setBranch] = React.useState(defaultBranch);

const styles = useStyles();
Expand Down

0 comments on commit ed58627

Please sign in to comment.