Skip to content

Commit

Permalink
change name of line seperator from "newline_character" to "delimiter"
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen-Morgan825 committed Dec 3, 2024
1 parent 7ff2ac0 commit dddc5cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/2024/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../schema.json",
"title": "QRScout",
"page_title": "Crescendo",
"newline_character": "\t",
"delimiter": "\t",
"sections": [
{
"name": "Prematch",
Expand Down
2 changes: 1 addition & 1 deletion config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"page_title": {
"type": "string"
},
"newline_character": {
"delimiter": {
"type": "string"
},
"sections": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/QR/PreviewText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type PreviewTextProps = {
};
export function PreviewText(props: PreviewTextProps) {
const formData = useQRScoutState(state => state.formData);
const chunks = props.data.split(formData.newline_character);
const chunks = props.data.split(formData.delimiter);
return (
<div className="flex flex-col items-center gap-2 shadow-md bg-gray-600 m-2 p-2 rounded-md">
<div className="text-justify p-2 rounded bg-gray-600 ">
Expand Down
2 changes: 1 addition & 1 deletion src/components/QR/QRModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function getQRCodeData(formData: Config): string {
.map(s => s.fields)
.flat()
.map(v => `${v.value}`.replace(/\n/g, ' '))
.join(formData.newline_character);
.join(formData.delimiter);
}

export function QRModal(props: QRModalProps) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/inputs/BaseInputProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default interface BaseInputProps extends InputProps {
export interface Config {
title: string;
page_title: string;
newline_character: string;
delimiter: string;
sections: SectionProps[];
}

Expand Down

0 comments on commit dddc5cd

Please sign in to comment.