website refactor
This commit is contained in:
@@ -37,6 +37,10 @@ export interface ParsedFilterParams {
|
||||
tier?: string | null;
|
||||
}
|
||||
|
||||
export interface ParsedWizardParams {
|
||||
step?: string | null;
|
||||
}
|
||||
|
||||
export class SearchParamParser {
|
||||
// Parse auth parameters
|
||||
static parseAuth(params: URLSearchParams): Result<ParsedAuthParams, string> {
|
||||
@@ -172,6 +176,13 @@ export class SearchParamParser {
|
||||
});
|
||||
}
|
||||
|
||||
// Parse wizard parameters
|
||||
static parseWizard(params: URLSearchParams): Result<ParsedWizardParams, string> {
|
||||
return Result.ok({
|
||||
step: params.get('step'),
|
||||
});
|
||||
}
|
||||
|
||||
// Parse all parameters at once
|
||||
static parseAll(params: URLSearchParams): Result<
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user