Skip to content

Commit

Permalink
Merge pull request #6 from frudolph77/hashInChuncks
Browse files Browse the repository at this point in the history
split hash in chunks of 3 chars when entering
  • Loading branch information
alexander-zibert authored Dec 2, 2023
2 parents fc60c46 + ab6a020 commit 2db2fc0
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 2db2fc0

Please sign in to comment.