mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-05 15:27:20 +02:00
8 lines
310 B
TypeScript
8 lines
310 B
TypeScript
|
|
import { matchPath } from 'react-router-dom';
|
||
|
|
|
||
|
|
const matchesRouteStart = (pathname: string, pattern: string) =>
|
||
|
|
matchPath({ path: pattern, end: false }, pathname) != null;
|
||
|
|
|
||
|
|
export const isArtifactRoute = (pathname: string) =>
|
||
|
|
matchesRouteStart(pathname, '/c/*') || matchesRouteStart(pathname, '/share/*');
|