GoonCord/src/ui/settings/components/SettingsSection.tsx
2023-01-10 08:05:56 +00:00

40 lines
No EOL
1.4 KiB
TypeScript

import { Forms } from "@ui/components";
import { getAssetIDByName } from "@ui/assets";
import settings from "@/lib/settings";
const { FormRow, FormSection, FormDivider } = Forms;
interface SettingsSectionProps {
navigation: any;
}
export default function SettingsSection({ navigation }: SettingsSectionProps) {
return (
<FormSection key="Vendetta" title="Vendetta">
<FormRow
label="General"
leading={() => <FormRow.Icon source={getAssetIDByName("settings")} />}
trailing={FormRow.Arrow}
onPress={() => navigation.push("VendettaSettings")}
/>
<FormDivider />
<FormRow
label="Plugins"
leading={() => <FormRow.Icon source={getAssetIDByName("debug")} />}
trailing={FormRow.Arrow}
onPress={() => navigation.push("VendettaPlugins")}
/>
{settings.developerSettings && (
<>
<FormDivider />
<FormRow
label="Developer"
leading={() => <FormRow.Icon source={getAssetIDByName("ic_progress_wrench_24px")} />}
trailing={FormRow.Arrow}
onPress={() => navigation.push("VendettaDeveloper")}
/>
</>
)}
</FormSection>
)
}