,
+ },
+]);
\ No newline at end of file
From 5f1724013dbb702e945c261b21b1095d3f9f0953 Mon Sep 17 00:00:00 2001
From: Robert Lucas <100799838+Robert-M-Lucas@users.noreply.github.com>
Date: Fri, 22 Mar 2024 14:30:47 +0000
Subject: [PATCH 2/3] Further layout changes
---
index.html | 2 +-
src/components/ExampleComponent.tsx | 5 +++++
src/main.tsx | 2 +-
src/{ => pages/index}/App.tsx | 0
src/router.tsx | 8 ++++++--
src/{ => utils}/firebase.ts | 3 ++-
6 files changed, 15 insertions(+), 5 deletions(-)
create mode 100644 src/components/ExampleComponent.tsx
rename src/{ => pages/index}/App.tsx (100%)
rename src/{ => utils}/firebase.ts (92%)
diff --git a/index.html b/index.html
index e4b78ea..6835719 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
- Vite + React + TS
+ Budget-19
diff --git a/src/components/ExampleComponent.tsx b/src/components/ExampleComponent.tsx
new file mode 100644
index 0000000..8eb1236
--- /dev/null
+++ b/src/components/ExampleComponent.tsx
@@ -0,0 +1,5 @@
+function ExampleComponent() {
+ return
Example
+}
+
+export default ExampleComponent;
\ No newline at end of file
diff --git a/src/main.tsx b/src/main.tsx
index 0d78e41..527c583 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import 'bootstrap/dist/css/bootstrap.css'
-import './firebase.ts'
+import './utils/firebase.ts'
import {RouterProvider} from "react-router-dom";
import {router} from "./router.tsx";
diff --git a/src/App.tsx b/src/pages/index/App.tsx
similarity index 100%
rename from src/App.tsx
rename to src/pages/index/App.tsx
diff --git a/src/router.tsx b/src/router.tsx
index 56e617a..b100497 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -1,5 +1,6 @@
import {createBrowserRouter} from "react-router-dom";
-import App from "./App.tsx";
+import App from "./pages/index/App.tsx";
+import ExampleComponent from "./components/ExampleComponent.tsx";
export const router = createBrowserRouter([
{
@@ -9,6 +10,9 @@ export const router = createBrowserRouter([
},
{
path: "/test",
- element:
Test Secondary Page
,
+ element: <>
+
Test Secondary Page
+
+ >,
},
]);
\ No newline at end of file
diff --git a/src/firebase.ts b/src/utils/firebase.ts
similarity index 92%
rename from src/firebase.ts
rename to src/utils/firebase.ts
index 7c48ee2..a747275 100644
--- a/src/firebase.ts
+++ b/src/utils/firebase.ts
@@ -1,7 +1,8 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
-// TODO: Add SDKs for Firebase products that you want to use
+
+// Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
From a88c0a1295724bb7ab68df9a13c8bdec3650a202 Mon Sep 17 00:00:00 2001
From: Robert Lucas <100799838+Robert-M-Lucas@users.noreply.github.com>
Date: Fri, 22 Mar 2024 17:13:01 +0000
Subject: [PATCH 3/3] Documentation and README.md updates
---
.gitignore | 2 ++
README.md | 53 ++++++++++++++++++++++++++++++++++++++++-
src/main.tsx | 4 +++-
src/pages/index/App.tsx | 5 +++-
src/router.tsx | 2 ++
5 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index a547bf3..45a627a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
+
+.firebase
\ No newline at end of file
diff --git a/README.md b/README.md
index 7892b68..9b82ae4 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,52 @@
-# Budget-19
\ No newline at end of file
+# Budget-19
+
+## Starting Development
+
+When making changes, create a branch with the name `dev-[Jira issue name]`
+e.g. `dev-SCRUM-7` and work on that. See [deployment](#deployment) for
+instructions on how to deploy your changes.
+
+## Files
+
+Initial page setup (e.g. title): `/index.html`
+
+Router config ([docs](https://reactrouter.com/en/main)): `/src/router.tsx`
+
+## Commands
+
+Serve webpage locally: `npm run dev`
+
+### Firebase
+
+Install Firebase tools: `npm install -g firebase-tools`
+
+Login to Firebase: `firebase login`
+
+Configure Firebase settings: `firebase init`
+> :warning: Overwrites current settings!
+
+Configure Firebase emulator(s): `firebase init emulators`
+
+Start Firebase emulator(s): `firebase emulators:start`
+
+## Deployment
+
+> :warning: Do not use `firebase deploy` to deploy! This will circumvent GitHub!
+
+### Test Deployment
+
+Creating a test deployment to Firebase:
+```
+npm run build
+firebase hosting:channel:deploy [Test Deployment Name]
+```
+
+### Production Deployment
+
+Making a [pull request](https://github.com/Robert-M-Lucas/budget-19/compare)
+will automatically create a test deployment to Firebase (i.e. not
+overwrite the production app). You should see a message below your new pull
+request notifying you that your changes are being deployed. Click on
+the link shown when this is complete to view your changes. The pull
+request can them be merged into the `master` branch from which it'll
+be automatically deployed to https://budget-19.web.app/.
\ No newline at end of file
diff --git a/src/main.tsx b/src/main.tsx
index 527c583..7e57a32 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,10 +1,12 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
-import 'bootstrap/dist/css/bootstrap.css'
import './utils/firebase.ts'
import {RouterProvider} from "react-router-dom";
import {router} from "./router.tsx";
+// ! Potentially temporary - UI Styling tbd
+import 'bootstrap/dist/css/bootstrap.css'
+
ReactDOM.createRoot(document.getElementById('root')!).render(
diff --git a/src/pages/index/App.tsx b/src/pages/index/App.tsx
index 18456c3..1fa907d 100644
--- a/src/pages/index/App.tsx
+++ b/src/pages/index/App.tsx
@@ -3,7 +3,10 @@ function App() {
<>