message: Set default page correctly when reset wizard
diff: import { call, put, takeEvery } from "redux-saga/effects";
  import { select } from "redux-saga/effects";
  +import { IOption } from "../../../types/option";
  import { ISelected } from "../../../types/selected";
  import { IVSCodeObject } from "../../../types/vscode";
  import { getPagesOptions } from "../../../utils/cliTemplatesParser";
  @@ -20,10 +21,10 @@ export function* frameworkSaga(vscode: IVSCodeObject): any {
  const selectedBackendSelector = (state: AppState) => state.userSelection.backendFramework;
  const selectedProjectTypeSelector = (state: AppState) => state.userSelection.projectType;
  - const selectedPages = yield select(selectedPagesSelector);
  - const selectedFrontend = yield select(selectedFrontendSelector);
  - const selectedBackend = yield select(selectedBackendSelector);
  - const selectedProjectType = yield select(selectedProjectTypeSelector);
  + const selectedPages: ISelected[] = yield select(selectedPagesSelector);
  + const selectedFrontend: ISelected = yield select(selectedFrontendSelector);
  + const selectedBackend: ISelected = yield select(selectedBackendSelector);
  + const selectedProjectType: ISelected = yield select(selectedProjectTypeSelector);
  if (selectedFrontend.internalName !== "" || selectedBackend.internalName !== "") {
  const event: any = yield call(
  @@ -35,28 +36,37 @@ export function* frameworkSaga(vscode: IVSCodeObject): any {
  );
  const pageOptions = getPagesOptions(event.data.payload.pages);
  yield put({ type: TEMPLATES_TYPEKEYS.SET_PAGES_OPTIONS_SUCCESS, payload: pageOptions });
  +
  + let newSelectedPages: ISelected[] = [];
  if (selectedPages.length === 0) {
  const blankPage = pageOptions[0];
  - const blankSelect: ISelected = {
  - author: blankPage.author,
  - defaultName: blankPage.defaultName,
  - internalName: blankPage.internalName,
  - isValidTitle: blankPage.isValidTitle,
  - icon: blankPage.icon,
  - licenses: blankPage.licenses,
  - title: blankPage.defaultName ? blankPage.defaultName : "",
  - id: Math.random().toString(),
  - editable: blankPage.editable,
  - };
  - selectedPages.push(blankSelect);
  + const blankSelect = mapIOptionToISelected(blankPage);
  + newSelectedPages.push(blankSelect);
  } else {
  - selectedPages.map((selectedPage: ISelected) => {
  - selectedPage.internalName = `wts.Page.${selectedFrontend.internalName}.${
  - selectedPage.defaultName ? selectedPage.defaultName.replace(" ", "") : ""
  - }`;
  - });
  + newSelectedPages = selectedPages.reduce((result, page) => {
  + const option = pageOptions.find((p) => p.defaultName === page.defaultName);
  + if (option) {
  + const iselected = mapIOptionToISelected(option, page.title);
  + result.push(iselected);
  + }
  + return result;
  + }, [] as ISelected[]);
  }
  - yield put({ type: USERSELECTION_TYPEKEYS.SELECT_PAGES, payload: selectedPages });
  + yield put({ type: USERSELECTION_TYPEKEYS.SELECT_PAGES, payload: newSelectedPages });
  }
  }
  +
  + const mapIOptionToISelected = (option: IOption, title: string = option.defaultName ?? ""): ISelected => {
  + return {
  + author: option.author,
  + defaultName: option.defaultName,
  + internalName: option.internalName,
  + isValidTitle: option.isValidTitle,
  + icon: option.icon,
  + licenses: option.licenses,
  + title: title,
  + id: Math.random().toString(),
  + editable: option.editable,
  + };
  + };
  }
  