Skip to content

Commit

Permalink
Display community details on settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferlund committed Aug 18, 2023
1 parent 4c09756 commit ba4bd16
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Box } from '@/components/ui/Box';
import { SettingsSubgroup } from './SettingsSubgroup';
import ApplicationSettingsApiKeys from './ApplicationSettingsApiKeys';
import { Setting as SettingDto } from '@/model/settings/dto/setting.dto';
import { useRecoilValue } from 'recoil';
import { CurrentCommunity } from '../../../model/community/community';

interface Params {
settings: SettingDto[] | undefined;
Expand All @@ -16,13 +18,29 @@ export const ApplicationSettings = ({
settings,
parentOnSubmit,
}: Params): JSX.Element | null => {
const community = useRecoilValue(CurrentCommunity);
if (!settings) return null;

return (
<>
<Box className="mb-6">
<SettingsSubgroup header="Application Settings">
<SettingsForm settings={settings} parentOnSubmit={parentOnSubmit} />
<>
<div className="flex flex-col gap-4 mb-4">
<div>
<label className="block font-bold group">Creator address</label>
<div>{community?.creator}</div>
</div>
<div>
<label className="block font-bold group">Owner addresses</label>
<div>
{community?.owners.map((owner) => (
<div key={owner}>{owner}</div>
))}
</div>
</div>
</div>
<SettingsForm settings={settings} parentOnSubmit={parentOnSubmit} />
</>
</SettingsSubgroup>
</Box>
<Box className="mb-6">
Expand Down

0 comments on commit ba4bd16

Please sign in to comment.