create project
This commit is contained in:
13
kitabcitab/node_modules/next/dist/esm/client/components/match-segments.js
generated
vendored
Normal file
13
kitabcitab/node_modules/next/dist/esm/client/components/match-segments.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export const matchSegment = (existingSegment, segment)=>{
|
||||
// Common case: segment is just a string
|
||||
if (typeof existingSegment === 'string' && typeof segment === 'string') {
|
||||
return existingSegment === segment;
|
||||
}
|
||||
// Dynamic parameter case: segment is an array with param/value. Both param and value are compared.
|
||||
if (Array.isArray(existingSegment) && Array.isArray(segment)) {
|
||||
return existingSegment[0] === segment[0] && existingSegment[1] === segment[1];
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
//# sourceMappingURL=match-segments.js.map
|
||||
Reference in New Issue
Block a user