Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
No EOL
850 B
Text
24 lines
No EOL
850 B
Text
export function compareRouterStates(a, b) {
|
|
const stateKeys = Object.keys(a);
|
|
if (stateKeys.length !== Object.keys(b).length) return false;
|
|
for(let i = stateKeys.length; i--;){
|
|
const key = stateKeys[i];
|
|
if (key === 'query') {
|
|
const queryKeys = Object.keys(a.query);
|
|
if (queryKeys.length !== Object.keys(b.query).length) {
|
|
return false;
|
|
}
|
|
for(let j = queryKeys.length; j--;){
|
|
const queryKey = queryKeys[j];
|
|
if (!b.query.hasOwnProperty(queryKey) || a.query[queryKey] !== b.query[queryKey]) {
|
|
return false;
|
|
}
|
|
}
|
|
} else if (!b.hasOwnProperty(key) || a[key] !== b[key]) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
//# sourceMappingURL=compare-states.js.map |