Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 1 addition & 38 deletions client/containers/CommunityCreate/CommunityCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,10 @@ const CommunityCreatedView = ({ subdomain, hubName }: { subdomain: string; hubNa
);
};

type KFOrg = {
id: string;
name: string;
slug: string;
type: 'personal' | 'shared';
role: string;
};

type Props = {
hubData?: Hub | null;
templates?: CommunityTemplate[];
hubCommunities?: { id: string; title: string; subdomain: string; avatar?: string | null }[];
kfOrgs?: KFOrg[];
};

const HubBrandedHeader = ({ hub }: { hub: Hub }) => {
Expand All @@ -118,7 +109,7 @@ const HubBrandedHeader = ({ hub }: { hub: Hub }) => {
};

const CommunityCreate = (props: Props) => {
const { hubData, templates = [], hubCommunities = [], kfOrgs = [] } = props;
const { hubData, templates = [], hubCommunities = [] } = props;
const { loginData, locationData } = usePageContext();
const altchaRef = useRef<import('components').AltchaRef>(null);
const hubSlug = hubData?.slug || locationData?.query?.hub || null;
Expand All @@ -135,12 +126,6 @@ const CommunityCreate = (props: Props) => {
const [selectedTemplateId, setSelectedTemplateId] = useState<string | null>(null);
const [cloneCommunityId, setCloneCommunityId] = useState<string | null>(null);

// KF org picker: default to personal org, or first available
const personalOrg = kfOrgs.find((o) => o.type === 'personal');
const [selectedKfOrgId, setSelectedKfOrgId] = useState<string | null>(
personalOrg?.id ?? kfOrgs[0]?.id ?? null,
);

const hasHub = !!hubData;
const hubAccentDark = hubData?.accentColorDark || '#2D2E2F';

Expand Down Expand Up @@ -178,7 +163,6 @@ const CommunityCreate = (props: Props) => {
...(selectedTemplateId === CLONE_MARKER && cloneCommunityId
? { cloneCommunityId }
: {}),
...(selectedKfOrgId ? { kfOrgId: selectedKfOrgId } : {}),
});
setCreateIsLoading(false);
setIsCreated(true);
Expand Down Expand Up @@ -324,27 +308,6 @@ const CommunityCreate = (props: Props) => {
onChange={onDescriptionChange}
helperText={`${description.length}/280 characters`}
/>
{kfOrgs.length > 1 && (
<InputField label="Organization">
<div className={Classes.HTML_SELECT}>
<select
value={selectedKfOrgId ?? ''}
onChange={(e) =>
setSelectedKfOrgId(e.target.value || null)
}
>
{kfOrgs.map((org) => (
<option key={org.id} value={org.id}>
{org.name}
{org.type === 'personal'
? ' (Personal)'
: ''}
</option>
))}
</select>
</div>
</InputField>
)}
{selectedTemplateId ? (
<Callout
intent="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import CommunityAuthTokens from './CommunityAuthTokens';
import DeleteCommunity from './DeleteCommunity';
import DiscussionsSection from './DiscussionsSection';
import { ExportCommunityDataButton } from './ExportCommunityDataButton';
import TransferOwnership from './TransferOwnership';

type PastExport = {
id: string;
Expand Down Expand Up @@ -103,8 +102,6 @@ const ExportAndDeleteSettings = (props: Props) => {

{communityData && <CommunityAuthTokens communityData={communityData} />}

<TransferOwnership communityData={communityData} />

<DeleteCommunity communityData={communityData} />
</>
);
Expand Down

This file was deleted.

6 changes: 0 additions & 6 deletions server/community/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
DefaultScope,
ForeignKey,
HasMany,
Index,
Is,
IsLowercase,
Length,
Expand Down Expand Up @@ -251,11 +250,6 @@ export class Community extends Model<
@Column(DataType.UUID)
declare templateId: string | null;

/** KF Auth organization that owns this community (for billing/ownership) */
@Index
@Column(DataType.TEXT)
declare kfOrgId: string | null;

/**
* CMS mode: the community is only visible to members;
* public visitors are shown a not-found page with a sign-in prompt.
Expand Down
1 change: 0 additions & 1 deletion server/community/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const createCommunity = async (
accentColorDark: inputValues.accentColorDark ?? '#000000',
navigation: [{ type: 'page', id: homePageId }],
hideCreatePubButton: true,
...(inputValues.kfOrgId ? { kfOrgId: inputValues.kfOrgId } : {}),
},
{ actorId: userData.id },
);
Expand Down
Loading
Loading