Thanks again, asonix. Updated dependencies to remove lines from Dockerfile. Fixed HRT Tracker... Again.

This commit is contained in:
Alexis Werefox 2021-04-26 16:49:40 +00:00
parent ae7876cf91
commit bebc2f84c2
5 changed files with 17519 additions and 1579 deletions

View File

@ -3,8 +3,6 @@ FROM node:12-alpine
RUN apk update && \ RUN apk update && \
apk add --no-cache bash apk add --no-cache bash
RUN npm install --save next && \ RUN npm install
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest && \
npm install --save axios
WORKDIR /usr/src/app WORKDIR /usr/src/app

12530
src/info/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,13 @@
"start": "next start -p 3444" "start": "next start -p 3444"
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^10.2.5",
"axios": "^0.21.1",
"foo": "^0.0.7",
"next": "10.1.3", "next": "10.1.3",
"postcss": "^8.2.13",
"react": "17.0.2", "react": "17.0.2",
"react-dom": "17.0.2" "react-dom": "17.0.2",
"tailwindcss": "^2.1.2"
} }
} }

View File

@ -16,8 +16,16 @@ function getTimes() {
}; };
} }
export default function HRT() { export const getServerSideProps = async () => {
const [timesArray, setTimesArray] = useState(getTimes()); return {
props: {
startTimes: getTimes(),
},
};
};
export default function HRT({ startTimes }) {
const [timesArray, setTimesArray] = useState(startTimes);
useEffect(() => { useEffect(() => {
const interval = setInterval(() => { const interval = setInterval(() => {
@ -32,17 +40,17 @@ export default function HRT() {
card_title="Track my HRT progress!" card_title="Track my HRT progress!"
> >
<WCard> <WCard>
<p className="p-6 text-lg md:text-2xl text-center text-werefox-blue-dark dark:text-werefox-blue"> <p className="text-lg md:text-2xl text-center text-werefox-blue-dark dark:text-werefox-blue">
I'm so glad you're interested!! I'm so glad you're interested!!
<br /> </p>
<p className="text-lg md:text-2xl text-center text-werefox-blue-dark dark:text-werefox-blue">
I have been on HRT for: I have been on HRT for:
<br /> </p>
<p className="grid grid-cols-1 grid-rows-4"> <div className="text-lg md:text-2xl text-center text-werefox-blue-dark dark:text-werefox-blue grid grid-cols-1 grid-rows-4">
{Object.keys(timesArray).map(t => ( {Object.keys(timesArray).map((t) => (
<p>{timesArray[t]}</p> <p>{timesArray[t]}</p>
))} ))}
</p> </div>
</p>
</WCard> </WCard>
</BasicPage> </BasicPage>
); );

File diff suppressed because it is too large Load Diff