More details
Leave a field empty to leave it as is.
Set a field to "null" to hide it on the presence.
You may need to reload Discord for changes to apply.
>
);
}
export function ReplaceSettings({ appIds, update, save }: SettingsProps) {
async function onChange(val: string | boolean, index: number, key: string) {
if (index === appIds.length - 1)
appIds.push(makeEmptyAppId());
appIds[index][key] = val;
save();
update();
}
return (
<>
{
appIds.map((setting, i) =>
{
isValidSnowflake(setting.appId) ?
{
onChange(value, i, "enabled");
}}
className={Margins.bottom8}
hideBorder={true}
>
Apply edits to app
: Add new application
}
Application ID {
onChange(v, i, "appId");
}}
validate={v =>
!v || isValidSnowflake(v) || "Invalid application ID"
}
/>
{
isValidSnowflake(setting.appId) && <>
New activity type
)
}
>
);
}