Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Mar 9, 2024
1 parent fc31eac commit 8960bba
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 43 deletions.
21 changes: 0 additions & 21 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,6 @@
echo "Checking commit message..."
message="$(cat $1)"

#requiredPattern="^(add|cut|fix|bump|make|start|stop|refactor|reformat|optimise|document|merge|configured) .*$"
#if ! [[ $message =~ $requiredPattern ]];
#then
# echo "-"
# echo "-"
# echo "-"
# echo "🚨 Wrong commit message! 😕"
# echo "The commit message must have this format:"
# echo "<verb in imperative mood> <what was done>"
# echo "Allowed verbs in imperative mood: add, cut, fix, bump, make, start, stop, refactor, reformat, optimise, document, merge"
# echo "Example: add login button"
# echo "-"
# echo "Your commit message was:"
# echo $message
# echo "-"
# echo "For more information, check script in .husky/commit-msg"
# echo "-"
# exit 1
#fi


# Check if the string has at least 9 characters
if [ ${#message} -lt 9 ]; then
echo "🚨 Wrong commit message! 😕"
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ npm run lint
# check comments
npm run comment:check


# run tests
npm run test

Expand Down
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

## Installation

1. Clone the repository with:
### Installation for development

1. Clone this repository with:

```bash
git clone https://github.com/cophilot/wannadbFrontend.git
Expand All @@ -47,6 +49,35 @@ npm install
npm run prepare
```

5. Check the `.env.development` file and make sure all the variables are set correctly.

6. [Start the frontend development server](#start).

### Installation for production

1. Clone this repository with:

```bash
git clone https://github.com/cophilot/wannadbFrontend.git
```

2. Make sure to have [nodejs](https://nodejs.org/en), [npm](https://www.npmjs.com/) installed.
3. Install the dependencies with:

```bash
npm install
```

4. Check the `.env.production` file and make sure all the variables are set correctly.

5. Build the frontend wih:

```bash
npm run build
```

6. The built frontend will be in the `dist` folder.

---

## Start
Expand All @@ -69,7 +100,10 @@ _Check the console for instructions!_

- **[scripts](scripts)** - Scripts for the project
- **[src](src)** - The source code
- **[assets](src/assets)** - The assets
- **[audio](src/audio)** - The audio files
- **[components](src/components)** - The React components
- **[data](src/data)** - Some data functions
- **[providers](src/providers)** - Custom React providers
- **[styles](src/styles)** - The styles
- **[types](src/types)** - Typescript types
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"test": "vitest run --coverage --mode development",
"test:watch": "vitest",
"prepare": "husky install",
"setup": "npm install && npm run prepare",
"generate": "python scripts/generate.py",
"g": "python scripts/generate.py",
"comment:check": "python scripts/check_comment.py",
Expand Down
19 changes: 0 additions & 19 deletions src/components/CustomNuggetEditor/CustomNuggetEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,6 @@ function CustomNuggetEditor({ doc, docBase }: Props) {
textarea.selectionEnd
)
);

// get mouse position
/* const selection = window.getSelection();
if (selection) {
console.log('Selection:', selection);
const range = selection.getRangeAt(0);
const rect = range.getBoundingClientRect();
// set botton position of the confirm button to the top position of the selected text
const confirmButton = document.getElementById(
'confirm-button' + id
);
if (confirmButton) {
console.log('Setting confirm button position');
confirmButton.setAttribute(
'style',
`top: ${rect.top}px; left: ${rect.right}px; position: absolute;`
);
}
} */
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/views/Home/Home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
h2 {
margin-top: 70px;
.db {
color: white;
color: var(--text-color);
}
}
}
Expand Down

0 comments on commit 8960bba

Please sign in to comment.