Skip to content

Commit 559b8fb

Browse files
authored
Merge branch 'main' into setup/backend
2 parents 9f16b98 + 62b3b2c commit 559b8fb

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.github/workflows/frontend.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- "**"
7-
paths:
8-
- "frontend/**"
97

108
jobs:
119
format:

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
### Contributing
2+
23
**Before making a commit, make sure the lint, test, and format checks pass.**
4+
35
1. Create a pull request and fill out the provided template. Ensure all fields are filled and that **the title is detailed**.
46
2. In order for a PR to be merged, it requires at least one approval from a technical lead, as well as a fully passing CI/CD pipeline. This is to ensure the commit tree in our main branch is clean and well-tested. To help with this, all pull requests will be squashed and merged.
57
3. In the case your PR is not initially approved, a technical lead will leave suggestions to improve. Once you have incorporated said improvements, feel free to re-request a review or message one of your TLs on Slack for another review.
8+
69
### Best Practices
10+
711
- We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit messages for uniformity and clarity.
812
- Make sure to write tests for the most complex parts of your code.
913
- For manual API testing, include screenshots from Postman.
1014
- Go uses **TitleCase** and React Native uses **camelCase** for naming conventions.
15+
1116
### If you have time...
1217
- *Want to go that extra level?* — Consider checking out [act](https://github.com/nektos/act).
1318
- If you're *real interested* in industry-level commit practices, consider [GPG/PGP signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) your commits.

docs/frontend.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
### Frontend Setup
2+
23
**Please set up the backend before proceeding.**
4+
35
### Configure Environment Variables
46
```shell
57
# Make an .env file in the frontend directory using the template in .env.example.
68
cd frontend && cp ../.env.example .env
9+
710
# Configure your environment variables in your IDE or using a command line text editor.
811
vim .env
912
```
13+
1014
### Enter the Development Environment
1115
```shell
1216
# Enter the development environment in the root directory.
1317
cd ../ && nix develop --impure
1418
```
19+
1520
### Install Frontend Dependencies
1621
```shell
1722
# Use bun to install frontend dependencies.
1823
cd frontend && bun install
1924
```
25+
2026
### Ensure the backend is running
2127
```shell
2228
# Create *another terminal window* and run the following:
2329
backend-run
2430
```
31+
2532
### Run the frontend
2633
```shell
2734
frontend run
2835
```
36+
2937
Finally, you can scan the QR code with the Expo Go app installed to view a development build with hot reloading.
3038
You can also use iOS/Android simulators to simulate & test the app on your computer.

frontend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ yarn-error.*
3939
../.idea/
4040

4141
# environment variables
42-
.env
42+
.env

frontend/components/ExternalLink.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ export function ExternalLink({ href, ...rest }: Props) {
2222
href={href}
2323
onPress={async (event) => {
2424
if (Platform.OS !== "web") {
25-
// Prevent the default behavior of linking to the default browser on native.
25+
2626
event.preventDefault();
27-
// Open the link in an in-app browser.
27+
2828
if (!isValidUrl(href)) {
2929
Alert.alert("Invalid URL", "An invalid URL was provided.");
3030
return;
3131
}
32+
3233
await openBrowserAsync(href);
3334
}
3435
}}

0 commit comments

Comments
 (0)