format src

This commit is contained in:
Sacha Weatherstone 2024-01-06 11:04:40 +10:00
parent 06e094c8f5
commit c9e67a8ec9
No known key found for this signature in database
10 changed files with 48 additions and 54 deletions

View file

@ -1,5 +1,4 @@
// class .markdown needs to be called or it is removed from the build
import React from "react";
const BaseCSS = () => {
return <div className="markdown">Shid Fard</div>;

View file

@ -340,11 +340,11 @@ export const FrequencyCalculator = (): JSX.Element => {
<div className="flex gap-2">
<label className="font-semibold">Number of channels:</label>
<input type="number" disabled value={numChannels} />
<input type="number" disabled={true} value={numChannels} />
</div>
<div className="flex gap-2">
<label className="font-semibold">Channel Frequency:</label>
<input type="number" disabled value={channelFrequency} />
<input type="number" disabled={true} value={channelFrequency} />
</div>
</div>
);

View file

@ -1,6 +1,5 @@
import Link from "@docusaurus/Link";
import Layout from "@theme/Layout";
import React from "react";
const Credits = (): JSX.Element => {
return (

View file

@ -1,5 +1,3 @@
import React from "react";
import { DeviceFirmwareResource } from "../../../utils/apiTypes";
export interface releaseCardProps {
@ -49,7 +47,7 @@ export const FirmwareCard = ({
) : (
<button
type="button"
disabled
disabled={true}
className="button button--secondary button--block"
>
Loading...

View file

@ -1,7 +1,5 @@
import React from "react";
import { FaAndroid, FaApple } from "react-icons/fa";
import useSWR from "swr";
import useSwr from "swr";
import {
ArrowTopRightOnSquareIcon,
@ -20,7 +18,7 @@ import {
} from "./_components/FirmwareCard";
const Firmware = (): JSX.Element => {
const { data, error } = useSWR<FirmwareReleases>(
const { data, error } = useSwr<FirmwareReleases>(
"https://api.meshtastic.org/github/firmware/list",
fetcher,
);
@ -64,7 +62,8 @@ const Firmware = (): JSX.Element => {
</div>
<div className="card__body">
<p>
Devices such as T-Echo, RAK4631, and RAK11300 are flashed via filesystem.
Devices such as T-Echo, RAK4631, and RAK11300 are flashed via
filesystem.
</p>
</div>
<div className="card__footer mt-auto">

View file

@ -1,5 +1,3 @@
import React from "react";
import Head from "@docusaurus/Head";
import Link from "@docusaurus/Link";
import useBaseUrl from "@docusaurus/useBaseUrl";

View file

@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { fromByteArray, toByteArray } from "base64-js";

View file

@ -1,35 +1,37 @@
import React from 'react';
import clsx from 'clsx';
import Translate from '@docusaurus/Translate';
import Heading from '@theme/Heading';
import Translate from "@docusaurus/Translate";
import Heading from "@theme/Heading";
import clsx from "clsx";
export default function NotFoundContent({ className }) {
return (
<main className={clsx('container margin-vert--xl', className)}>
<main className={clsx("container margin-vert--xl", className)}>
<div className="row">
<div className="col col--6 col--offset-3">
<Heading as="h1" className="hero__title">
<Translate
id="theme.NotFound.title"
description="The title of the 404 page">
description="The title of the 404 page"
>
Page Not Found
</Translate>
</Heading>
<p>
<Translate
id="theme.NotFound.p1"
description="The first paragraph of the 404 page">
description="The first paragraph of the 404 page"
>
We could not find what you were looking for.
</Translate>
</p>
<p>
<Translate
id="theme.NotFound.p2"
description="The 2nd paragraph of the 404 page">
description="The 2nd paragraph of the 404 page"
>
Please contact the owner of the site that linked you to the
original URL and let them know their link is broken.
</Translate>
</p>
<img src="/design/chirpy.png" alt='Chirpy' />
<img src="/design/chirpy.png" alt="Chirpy" />
</div>
</div>
</main>

View file

@ -1,12 +1,11 @@
import React from 'react';
import {translate} from '@docusaurus/Translate';
import {PageMetadata} from '@docusaurus/theme-common';
import Layout from '@theme/Layout';
import NotFoundContent from '@theme/NotFound/Content';
import { translate } from "@docusaurus/Translate";
import { PageMetadata } from "@docusaurus/theme-common";
import Layout from "@theme/Layout";
import NotFoundContent from "@theme/NotFound/Content";
export default function Index() {
const title = translate({
id: 'theme.NotFound.title',
message: 'Page Not Found',
id: "theme.NotFound.title",
message: "Page Not Found",
});
return (
<>

View file

@ -1,8 +1,8 @@
export default function calculateADC() {
//const variables
const BAT_MILLIVOLTS_FULL = 4.2;
const BAT_MILLIVOLTS_EMPTY = 3.27;
const BAT_FULL_PERCENT = 1;
const batMillivoltsFull = 4.2;
const batMillivoltsEmpty = 3.27;
const batFullPercent = 1;
//variable
const batteryChargePercent =
parseFloat(
@ -13,10 +13,10 @@ export default function calculateADC() {
);
const result =
(operativeAdcMultiplier *
((BAT_FULL_PERCENT - 1) * BAT_MILLIVOLTS_EMPTY -
BAT_FULL_PERCENT * BAT_MILLIVOLTS_FULL)) /
((batteryChargePercent - 1) * BAT_MILLIVOLTS_EMPTY -
batteryChargePercent * BAT_MILLIVOLTS_FULL);
((batFullPercent - 1) * batMillivoltsEmpty -
batFullPercent * batMillivoltsFull)) /
((batteryChargePercent - 1) * batMillivoltsEmpty -
batteryChargePercent * batMillivoltsFull);
(<HTMLInputElement>(
document.getElementById("newOperativeAdcMultiplier")
)).value = result.toFixed(4);