Compare commits

..

5 Commits

Author SHA1 Message Date
6c2ebe7d7a Added: dist/ to biome ignore 2024-06-02 23:06:58 +02:00
1dd7952976 Code formatted 2024-06-02 23:06:32 +02:00
922a11b23b Added: package.json format script 2024-06-02 23:05:57 +02:00
5a2a2db5e2 Fixes: error handling on signup page #13 2024-06-02 23:04:42 +02:00
61449caef1 Updated README.md 2024-06-02 22:34:07 +02:00
5 changed files with 119 additions and 103 deletions

View File

@ -35,7 +35,12 @@ To get started with DeguApp, follow these steps:
2. Install dependencies:
```bash
cd deguapp
# frontend
cd deguapp/frontend
npm install
# backend
cd deguapp/api
npm install
```
@ -43,11 +48,6 @@ To get started with DeguApp, follow these steps:
5. Open the app in your browser or Android emulator and start exploring!
## Contributing
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
## Local builds
### Android
@ -74,12 +74,24 @@ bundletool build-apks --bundle=./frontend/android/app/build/outputs/bundle/relea
bundletool install-apks --apks=./deguapp.apks
```
### Resources:
#### Resources:
- https://github.com/expo/eas-cli/issues/1300
- https://reactnative.dev/docs/signed-apk-android#generating-the-release-aab
### Server
```bash
cd api/
npm i
npm run build
```
## Contributing
Contributions are welcome! If you'd like to contribute to DeguApp, please fork the repository and submit a pull request with your changes.
Use the upstream of the project, which can be found at https:/git.filiprojek.cz/fr/deguapp. **GitHub repository is just a mirror!**
## License
This project is licensed under the GNU GPLv3 License - see the [LICENSE](LICENSE) file for details.

View File

@ -12,9 +12,7 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},

View File

@ -16,23 +16,28 @@ function SignupPage() {
const { onSignin } = useAuth();
async function signin() {
if (pass1 == pass2) {
if (pass1 != pass2) {
alert("Passwords are not same!");
return;
}
const res = await onSignin(username, email, pass1);
if (res.error) {
if (res.msg.message == "validation error") {
alert(res.msg.data.message);
const data = await res.json();
if (res.status == 400) {
if (data.message == "validation error") {
alert(data.data.message);
} else {
alert(res.msg.message);
}
}
if (!res.error) {
alert("You have been successfully registered. Please Log In");
router.replace("/login");
alert("Something went wrong");
}
return;
}
alert("Passwords are not same!");
if (res.status == 201) {
alert("You have been successfully registered. Please Log In");
router.replace("/login");
return;
}
}
return (

View File

@ -1,7 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"files": {
"ignore": [".expo/", ".vscode/", "node_modules/"]
"ignore": [".expo/", ".vscode/", "node_modules/", "dist/"]
},
"organizeImports": {
"enabled": true

View File

@ -7,7 +7,8 @@
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"build:web": "npx expo export"
"build:web": "npx expo export",
"format": "npx @biomejs/biome format --write ."
},
"dependencies": {
"@expo/metro-runtime": "~3.2.1",