Skip to content

Commit

Permalink
split hash in chunks of 3 chars when entering
Browse files Browse the repository at this point in the history
  • Loading branch information
frudolph77 committed Nov 28, 2023
1 parent fc60c46 commit ab6a020
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/store/slices/registrationSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export const registrationSlice = createSlice({
state.name = action.payload;
},
updateHash: (state, action: PayloadAction<string>) => {
state.hash = action.payload.replace("#", "");
state.hash = action.payload
.replace("#", "")
.replaceAll(" ", "")
.split(/(.{3})/)
.filter(e => e)
.join(" ");
},
},
});
Expand Down

0 comments on commit ab6a020

Please sign in to comment.