-comments

This commit is contained in:
Florian Dold 2023-07-31 15:57:06 +02:00
parent 0ac5dba088
commit e3460de331
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 6 additions and 1 deletions

View File

@ -136,6 +136,7 @@ export interface DiscoveryUiState {
export interface AnastasisReducerApi { export interface AnastasisReducerApi {
currentReducerState: ReducerState | undefined; currentReducerState: ReducerState | undefined;
// FIXME: Explain better!
currentError: any; currentError: any;
discoveryState: DiscoveryUiState; discoveryState: DiscoveryUiState;
dismissError: () => void; dismissError: () => void;

View File

@ -46,8 +46,9 @@ export function ContinentSelectionScreen(): VNode {
// const cc = reducer.currentReducerState.selected_country || ""; // const cc = reducer.currentReducerState.selected_country || "";
const theCountry = countryList.find((c) => c.code === countryCode); const theCountry = countryList.find((c) => c.code === countryCode);
const selectCountryAction = async () => { const selectCountryAction = async () => {
//selection should be when the select box changes it value // selection should be when the select box changes it value
if (!theCountry) return; if (!theCountry) return;
// FIXME: Why is there no await?
reducer.transition("select_country", { reducer.transition("select_country", {
country_code: countryCode, country_code: countryCode,
}); });
@ -56,6 +57,7 @@ export function ContinentSelectionScreen(): VNode {
// const step1 = reducer.currentReducerState.backup_state === BackupStates.ContinentSelecting || // const step1 = reducer.currentReducerState.backup_state === BackupStates.ContinentSelecting ||
// reducer.currentReducerState.recovery_state === RecoveryStates.ContinentSelecting; // reducer.currentReducerState.recovery_state === RecoveryStates.ContinentSelecting;
// FIXME: i18n
const errors = !theCountry ? "Select a country" : undefined; const errors = !theCountry ? "Select a country" : undefined;
const handleBack = async () => { const handleBack = async () => {

View File

@ -228,6 +228,8 @@ function AnastasisClientImpl(): VNode {
return <StartScreen />; return <StartScreen />;
} }
// FIXME: Use switch statements here!
if ( if (
(state.reducer_type === "backup" && (state.reducer_type === "backup" &&
state.backup_state === BackupStates.ContinentSelecting) || state.backup_state === BackupStates.ContinentSelecting) ||