[Cleanup] Small tidying

This commit is contained in:
Beef 2022-10-19 07:58:32 +01:00
parent 1679b51889
commit b4f5bdc996
6 changed files with 17 additions and 10 deletions

4
src/ui/components.ts Normal file
View file

@ -0,0 +1,4 @@
import { findByProps } from "@metro/filters";
// TODO: Type individual props
export const Forms = findByProps("FormSection");

View file

@ -1,8 +1,8 @@
import { React, ReactNative as RN } from "@metro/common";
import { findByProps } from "@metro/filters";
import { Forms } from "@ui/components";
import Version from "./Version";
const { FormRow, FormSection, FormText } = findByProps("FormSection");
const { FormRow, FormSection } = Forms;
const hermesProps = window.HermesInternal.getRuntimeProperties();
const rnVer = RN.Platform.constants.reactNativeVersion;

View file

@ -1,7 +1,7 @@
import { React } from "@metro/common";
import { findByProps } from "@metro/filters";
import { Forms } from "@ui/components";
const { FormRow, FormSection } = findByProps("FormSection");
const { FormRow, FormSection } = Forms;
interface SettingsSectionProps {
navigation: any;

View file

@ -1,12 +1,12 @@
import { React } from "@metro/common";
import { findByProps } from "@metro/filters";
import { Forms } from "@ui/components";
interface VersionProps {
label: string;
version: string
}
const { FormRow, FormText } = findByProps("FormSection");
const { FormRow, FormText } = Forms;
export default function Version({ label, version }: VersionProps) {
return (