mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 10:55:45 +03:00
app-search: allow distros longer than a planet
This commit is contained in:
parent
73d41458fa
commit
3629186677
@ -58,9 +58,7 @@ export const AppSearch = React.forwardRef(
|
||||
query?: string;
|
||||
desk?: string;
|
||||
}>(`/${menu}/:query?/(apps)?/:desk?`);
|
||||
const appsMatch = useRouteMatch(
|
||||
`/${menu}/${deskMatch?.params.query}/apps`
|
||||
);
|
||||
const appsMatch = useRouteMatch(`/${menu}/${deskMatch?.params.query}/apps`);
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
useImperativeHandle(ref, () => inputRef.current);
|
||||
const { rawInput, selectedMatch, matches, selection, select } =
|
||||
@ -128,7 +126,7 @@ export const AppSearch = React.forwardRef(
|
||||
const normalizedValue = input
|
||||
.trim()
|
||||
.replace('%', '')
|
||||
.replace(/(~?[\w^_-]{3,13})\//, '$1/apps/$1/');
|
||||
.replace(/(~?[\w^_-]{3,56})\//, '$1/apps/$1/');
|
||||
push(`/${menu}/${normalizedValue}`);
|
||||
},
|
||||
[menu]
|
||||
|
Loading…
Reference in New Issue
Block a user