|
@@ -3,10 +3,15 @@ import React, { useState } from "react";
|
|
|
import WeightConverter from "./WeightConverter";
|
|
import WeightConverter from "./WeightConverter";
|
|
|
import TimeConverter, { TimeConverterStateProvider } from "./TimeConverter";
|
|
import TimeConverter, { TimeConverterStateProvider } from "./TimeConverter";
|
|
|
import NavBarRow from "../../components/NavBarRow";
|
|
import NavBarRow from "../../components/NavBarRow";
|
|
|
|
|
+import WeightConverter2 from "./WeightConverter2";
|
|
|
|
|
|
|
|
function UnitConverterPage() {
|
|
function UnitConverterPage() {
|
|
|
const [currentPage, setCurrentPage] = useState("default_site");
|
|
const [currentPage, setCurrentPage] = useState("default_site");
|
|
|
- const availablePages = ["Time Converter", "Weight Converter"];
|
|
|
|
|
|
|
+ const availablePages = [
|
|
|
|
|
+ "Time Converter",
|
|
|
|
|
+ "Weight Converter",
|
|
|
|
|
+ "Weight Converter2",
|
|
|
|
|
+ ];
|
|
|
let subPage = <Typography>Pick a converter</Typography>;
|
|
let subPage = <Typography>Pick a converter</Typography>;
|
|
|
|
|
|
|
|
switch (currentPage) {
|
|
switch (currentPage) {
|
|
@@ -22,12 +27,15 @@ function UnitConverterPage() {
|
|
|
case "Weight Converter":
|
|
case "Weight Converter":
|
|
|
subPage = <WeightConverter />;
|
|
subPage = <WeightConverter />;
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case "Weight Converter2":
|
|
|
|
|
+ subPage = <WeightConverter2 />;
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.debug("UnitConverterPage rerender!");
|
|
console.debug("UnitConverterPage rerender!");
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <Box maxWidth={455} margin={15}>
|
|
|
|
|
|
|
+ <Box maxWidth={800} margin={15}>
|
|
|
<Typography variant="h4">The miracle unit converter!</Typography>
|
|
<Typography variant="h4">The miracle unit converter!</Typography>
|
|
|
<Typography variant="body1">
|
|
<Typography variant="body1">
|
|
|
Use the controls to your advantage!
|
|
Use the controls to your advantage!
|