mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(phone/getLocationFromUrl): fix type mismatch
This commit is contained in:
1 parent
9d7ddbca6f
commit
1566bb0fdb
1 file changed
+6
-1
@@ -1,6 +1,11 @@
|
|||||||
import parseUrl from 'parse-url';
|
import parseUrl from 'parse-url';
|
||||||
|
|
||||||
export const getLocationFromUrl = (url: String) => {
|
interface GetLocationFromUrlValue {
|
||||||
|
pathname: string;
|
||||||
|
search: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getLocationFromUrl = (url: string): GetLocationFromUrlValue => {
|
||||||
const { pathname, search } = parseUrl(url);
|
const { pathname, search } = parseUrl(url);
|
||||||
const searchStr = '?' + (search || '');
|
const searchStr = '?' + (search || '');
|
||||||
return { pathname, search: searchStr };
|
return { pathname, search: searchStr };
|
||||||
|
|||||||
Reference in new issue
Block a user