1
0
Fork 0

wip(shared): Changes to navigation flow towards new pattern

This commit is contained in:
joostdecock 2023-06-20 17:30:18 +02:00
parent d2d1c78af4
commit d1769348b3
10 changed files with 406 additions and 21 deletions

View file

@ -281,3 +281,12 @@ export const scrollTo = (id) => {
// eslint-disable-next-line no-undef
if (document) document.getElementById(id).scrollIntoView()
}
export const hasRequiredMeasurements = (Design, measies = {}) => {
const missing = []
for (const m of Design.patternConfig?.measurements || []) {
if (typeof measies[m] === 'undefined') missing.push(m)
}
return [missing.length === 0, missing]
}