Skip to content

Commit 86cc035

Browse files
Merge pull request #28 from CivicTechAtlanta/fix-service-worker
Fix service worker
2 parents ae5cbaa + 4881969 commit 86cc035

File tree

8 files changed

+5
-59
lines changed

8 files changed

+5
-59
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
cache: npm
2727
- name: Setup Pages
2828
uses: actions/configure-pages@v5
29-
with:
30-
static_site_generator: next
3129
- name: Restore cache
3230
uses: actions/cache@v4
3331
with:

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,11 @@ First, run the development server:
88
npm run dev
99
```
1010

11-
Open [http://localhost:3000/](http://localhost:3000/) with your browser to see the result.
11+
Open [http://localhost:3000/agua-vida-poc](http://localhost:3000/agua-vida-poc) with your browser to see the result.
1212

1313
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
1414

1515
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
1616

1717
## Serve Exported Static Site
18-
Run `npm run build` to generate static files. Then run `npx serve@latest out` to host static site locally.
19-
20-
## Learn More
21-
22-
To learn more about Next.js, take a look at the following resources:
23-
24-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
25-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
26-
27-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
18+
Run `npm run build` to generate static files. Then run `npx serve@latest out` to host static site locally. You may need to comment out the `basePath` configuration in the `next.config.ts` file before running `npm run build` to ensure the paths are correct locally.

manifest-path-fixup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ echo 'fixing manifest.json path in generated html files...'
44

55
for html in $(find ./out -iregex '.*\.html' -not -wholename '*/404.html')
66
do
7-
sed -i -e 's/\/manifest.json/\/agua-vida-poc\/manifest.json/' $html
7+
sed -i -e 's/\/manifest.json/manifest.json/' $html
88
echo "fixed $html"
99
done
1010

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const withSerwist = withSerwistInit({
99

1010
const nextConfig: NextConfig = {
1111
output: 'export',
12+
basePath: '/agua-vida-poc',
1213
};
1314

1415
export default withSerwist(nextConfig);

src/app/chlorine-weight/page.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export default function ChlorineWeightFormula() {
1616
const [errorMessage, setErrorMessage] = useState('');
1717

1818
const [showModal, setShowModal] = useState(null as string | null);
19-
console.log('showModal:', showModal);
20-
console.log('showModal === info:', showModal === 'info');
2119

2220
const [formData, setFormData] = useState({
2321
motherSolution: '',
@@ -30,11 +28,6 @@ export default function ChlorineWeightFormula() {
3028
//Calculate the weight of chlorine needed
3129
const chlorineWeight = .36 * ((Number(formData.motherSolution) * Number(formData.waterIngress) * Number(formData.desiredConcentration)) / (Number(formData.dripRate) * Number(formData.chlorinePercentage)))
3230

33-
function printChlorineFormula() {
34-
console.log("The weight of chlorine needed is: " + chlorineWeight + " grams");
35-
}
36-
printChlorineFormula() // The weight of chlorine needed is: 0.6 grams
37-
3831
const handleClick = () => {
3932
if (
4033
formData.motherSolution === '' ||

src/app/components/Home/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import './Home.scss';
33

44
export default function Home() {
55
return (
6-
<Link href="/">
6+
<Link href="//">
77
<svg className="home" viewBox="0,0,256,256" width="50px" height="50px" fillRule="nonzero"><g fillRule="nonzero" stroke="none" strokeWidth="1" strokeLinecap="butt" strokeLinejoin="miter" strokeMiterlimit="10" strokeDasharray="" strokeDashoffset="0"><g transform="scale(5.12,5.12)"><path d="M25,1.05078c-0.2175,0 -0.43414,0.06898 -0.61914,0.20898l-23,17.95117c-0.43,0.34 -0.50992,0.9682 -0.16992,1.4082c0.34,0.43 0.9682,0.50992 1.4082,0.16992l1.38086,-1.07812v26.28906c0,0.55 0.45,1 1,1h14v-18h12v18h14c0.55,0 1,-0.45 1,-1v-26.28906l1.38086,1.07812c0.19,0.14 0.39914,0.21094 0.61914,0.21094c0.3,0 0.58906,-0.13086 0.78906,-0.38086c0.34,-0.44 0.26008,-1.0682 -0.16992,-1.4082l-23,-17.95117c-0.185,-0.14 -0.40164,-0.20898 -0.61914,-0.20898zM35,5v1.05078l6,4.67969v-5.73047z"></path></g></g></svg>
88
</Link>
99
);

src/app/mother-solution-concentration/page.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,6 @@ import LanguageSelector from "../components/LanguageSelector/LanguageSelector";
99

1010
import "./styles/Main.css";
1111

12-
13-
const mother_solution_volume = 600; // liters
14-
const weight_of_chlorine = 100; // grams
15-
const desired_reservoir_concentration = 1; // miligrams/liter
16-
17-
const concentration_mother_solution =
18-
(weight_of_chlorine * 10 * desired_reservoir_concentration) /
19-
mother_solution_volume; // miligrams/liter
20-
21-
function printMotherSolutionConcentration() {
22-
console.log(
23-
"The concentration of the mother solution is: " +
24-
concentration_mother_solution +
25-
" milligrams/liter"
26-
);
27-
}
28-
29-
printMotherSolutionConcentration();
30-
3112
export default function MotherSolutionConcentrationFormula() {
3213
const { t } = useTranslation();
3314

src/app/reservoir-ingress/page.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,6 @@ import "./styles/Main.css";
88
import LanguageSelector from "../components/LanguageSelector/LanguageSelector";
99
import Home from "../components/Home/Home";
1010

11-
const containerSize = 20 // liters
12-
13-
const tryOne = 20 // seconds
14-
const tryTwo = 25
15-
const tryThree = 22
16-
17-
const sum = tryOne + tryTwo + tryThree
18-
19-
const avg = sum / 3
20-
21-
const ingress = containerSize / avg // liters/second
22-
23-
function printIngressFormula() {
24-
console.log("The ingress formula is: " + ingress + " liters/second");
25-
}
26-
27-
printIngressFormula()
28-
2911
export default function ReservoirIngressFormula() {
3012
const { t } = useTranslation();
3113

0 commit comments

Comments
 (0)