mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 09:51:36 +03:00
Merge pull request #5738 from urbit/mp/grid/shortcode-redirects
grid: pasting shortcodes redirects to app page
This commit is contained in:
commit
2b8ad871bb
@ -72,7 +72,6 @@ export const Leap = React.forwardRef(
|
||||
|
||||
useEffect(() => {
|
||||
const newMatch = getMatch(rawInput);
|
||||
|
||||
if (newMatch && rawInput) {
|
||||
useLeapStore.setState({ selectedMatch: newMatch });
|
||||
}
|
||||
@ -112,7 +111,7 @@ export const Leap = React.forwardRef(
|
||||
|
||||
const navigateByInput = useCallback(
|
||||
(input: string) => {
|
||||
const normalizedValue = input.trim().replace(/(~?[\w^_-]{3,13})\//, '$1/apps/');
|
||||
const normalizedValue = input.trim().replace(/(~?[\w^_-]{3,13})\//, '$1/apps/$1/');
|
||||
push(`/leap/${menu}/${normalizedValue}`);
|
||||
},
|
||||
[menu]
|
||||
|
Loading…
Reference in New Issue
Block a user