8 lines
196 B
TypeScript
8 lines
196 B
TypeScript
export const redirectSystemPath = ({ path }: { path: string; initial: boolean }) => {
|
|
try {
|
|
return new URL(path).hostname === "expo-sharing" ? "/" : path;
|
|
} catch {
|
|
return "/";
|
|
}
|
|
};
|