Skip to content

Commit 5c06255

Browse files
add rough render for h3 alone when license path currenty set is valid to a possibility
1 parent 8bc76e8 commit 5c06255

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/scripts.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ function setStateCurrent(element, index, state) {
113113

114114
// function to set state.props
115115
// including setting state.props.license (if valid)
116+
// or error
116117
function setStateProps(state) {
117118

118119
state.props = {};
@@ -146,25 +147,24 @@ function watchFieldsets(fieldsets, state) {
146147
setStateProps(state);
147148
console.log("state.props (after change)");
148149
console.log(state.props);
149-
150+
151+
renderLicenseRec(state);
150152
});
151153

152154
});
153155
}
154156

155157

156158

157-
// function to compare state.possibilities to state.current,
158-
// determine if valid license, or error
159-
160-
161-
162159
// stepper logic here for what parts of form are
163160
// displayed/hidden, as state.parts and state.current
164161
// are updated
165162

166163
// function to render "license recommendation",
167164
// if valid license from state.parts and/or state.current
165+
function renderLicenseRec(state) {
166+
document.querySelector('#license-recommendation header h3').textContent = state.props.license;
167+
}
168168

169169
// function to render "mark your work", from attribution fields
170170
// if valid license from state.parts and/or state.current

0 commit comments

Comments
 (0)