diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 00000000..2cce8761 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,20 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: yarn install && yarn build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GRAPHAPP_BCA04 }}' + channelId: live + projectId: graphapp-bca04 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 00000000..0fcd0aa9 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,17 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +"on": pull_request +jobs: + build_and_preview: + if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: yarn install && yarn build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_GRAPHAPP_BCA04 }}" + projectId: graphapp-bca04 diff --git a/.gitignore b/.gitignore index 0f43ddbe..b63cb8f3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ build .yarn/install-state.gz # Firebase +.firebase/* firebase.json .firebaserc diff --git a/package.json b/package.json index 2a20f425..27424339 100644 --- a/package.json +++ b/package.json @@ -59,4 +59,4 @@ "prettier-plugin-tailwindcss" ] } -} +} \ No newline at end of file diff --git a/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx b/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx index f23b9ab8..498e3bf3 100644 --- a/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx +++ b/src/components/Graph/AnalysisWindow/AnalysisWindow.tsx @@ -1,8 +1,8 @@ import { FC, createContext, useRef } from "react"; import Draggable from "react-draggable"; -import Header from "./Header"; import Content from "./Content"; +import Header from "./Header"; import { AddressAnalysis } from "../../../api/model"; diff --git a/src/components/Graph/Graph.tsx b/src/components/Graph/Graph.tsx index 47f16e17..c6ac318e 100644 --- a/src/components/Graph/Graph.tsx +++ b/src/components/Graph/Graph.tsx @@ -29,7 +29,7 @@ import { import { TransfershipEdge, - TransfershipEdgeStates, + TransfershipEdgeStates } from "./custom_elements/edges/TransfershipEdge"; import { diff --git a/src/components/Graph/LandingPage/LandingPage.tsx b/src/components/Graph/LandingPage/LandingPage.tsx index 2da561aa..824d16c8 100644 --- a/src/components/Graph/LandingPage/LandingPage.tsx +++ b/src/components/Graph/LandingPage/LandingPage.tsx @@ -1,5 +1,5 @@ -import { FC } from "react"; import { SparklesIcon } from "@heroicons/react/20/solid"; +import { FC } from "react"; import logo from "../../../assets/ward-logo-blue-full.svg"; import Searchbar from "./SearchBar"; diff --git a/src/components/Graph/custom_elements/edges/TransfershipEdge/CustomEdgePath.tsx b/src/components/Graph/custom_elements/edges/TransfershipEdge/CustomEdgePath.tsx index 52778765..2f52f1f9 100644 --- a/src/components/Graph/custom_elements/edges/TransfershipEdge/CustomEdgePath.tsx +++ b/src/components/Graph/custom_elements/edges/TransfershipEdge/CustomEdgePath.tsx @@ -1,5 +1,5 @@ -import { CSSProperties } from "react"; import clsx from "clsx"; +import { CSSProperties } from "react"; import "./CustomEdgePath.css"; diff --git a/src/components/Graph/graph_calculations.tsx b/src/components/Graph/graph_calculations.tsx index 4ce87fea..689b67ec 100644 --- a/src/components/Graph/graph_calculations.tsx +++ b/src/components/Graph/graph_calculations.tsx @@ -1,12 +1,10 @@ -import { Node, Edge, XYPosition } from "reactflow"; +import { Edge, Node, XYPosition } from "reactflow"; +import { TransfershipEdgeStates, createTransfershipEdge } from "./custom_elements/edges/TransfershipEdge"; import { - createAddressNode, AddressNodeState, + createAddressNode, } from "./custom_elements/nodes/AddressNode"; -import { - createTransfershipEdge, - TransfershipEdgeStates, -} from "./custom_elements/edges/TransfershipEdge"; + // How much distance there should be between two nodes when calculating new address nodes positions const INTERSECTING_NODE_X_OFFSET = 300;