mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-27 03:56:44 +02:00
temporarily disable ranking option
This commit is contained in:
@@ -54,7 +54,7 @@ export type FormValues = {
|
|||||||
mods: string[];
|
mods: string[];
|
||||||
relays: string[];
|
relays: string[];
|
||||||
links: ([string] | [string, string])[];
|
links: ([string] | [string, string])[];
|
||||||
ranking: string;
|
// ranking: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function CommunityCreateModal({
|
export default function CommunityCreateModal({
|
||||||
@@ -90,12 +90,12 @@ export default function CommunityCreateModal({
|
|||||||
mods: account ? [account.pubkey] : [],
|
mods: account ? [account.pubkey] : [],
|
||||||
relays: [],
|
relays: [],
|
||||||
links: [],
|
links: [],
|
||||||
ranking: "votes",
|
// ranking: "votes",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
watch("mods");
|
watch("mods");
|
||||||
watch("ranking");
|
// watch("ranking");
|
||||||
watch("banner");
|
watch("banner");
|
||||||
watch("links");
|
watch("links");
|
||||||
watch("relays");
|
watch("relays");
|
||||||
@@ -278,7 +278,7 @@ export default function CommunityCreateModal({
|
|||||||
</Flex>
|
</Flex>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormControl isInvalid={!!errors.mods}>
|
{/* <FormControl isInvalid={!!errors.mods}>
|
||||||
<FormLabel>Default Raking</FormLabel>
|
<FormLabel>Default Raking</FormLabel>
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
value={getValues().ranking}
|
value={getValues().ranking}
|
||||||
@@ -291,7 +291,7 @@ export default function CommunityCreateModal({
|
|||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<FormHelperText>The default way posts are ranked when viewing the community</FormHelperText>
|
<FormHelperText>The default way posts are ranked when viewing the community</FormHelperText>
|
||||||
{errors.ranking?.message && <FormErrorMessage>{errors.ranking?.message}</FormErrorMessage>}
|
{errors.ranking?.message && <FormErrorMessage>{errors.ranking?.message}</FormErrorMessage>}
|
||||||
</FormControl>
|
</FormControl> */}
|
||||||
|
|
||||||
<FormControl isInvalid={!!errors.mods}>
|
<FormControl isInvalid={!!errors.mods}>
|
||||||
<FormLabel>Relays</FormLabel>
|
<FormLabel>Relays</FormLabel>
|
||||||
|
@@ -47,7 +47,7 @@ function CommunitiesHomePage() {
|
|||||||
for (const pubkey of values.mods) draft.tags.push(["p", pubkey, "", "moderator"]);
|
for (const pubkey of values.mods) draft.tags.push(["p", pubkey, "", "moderator"]);
|
||||||
for (const url of values.relays) draft.tags.push(["relay", url]);
|
for (const url of values.relays) draft.tags.push(["relay", url]);
|
||||||
for (const [url, name] of values.links) draft.tags.push(name ? ["r", url, name] : ["r", url]);
|
for (const [url, name] of values.links) draft.tags.push(name ? ["r", url, name] : ["r", url]);
|
||||||
if (values.ranking) draft.tags.push(["rank_mode", values.ranking]);
|
// if (values.ranking) draft.tags.push(["rank_mode", values.ranking]);
|
||||||
|
|
||||||
const signed = await requestSignature(draft);
|
const signed = await requestSignature(draft);
|
||||||
new NostrPublishAction(
|
new NostrPublishAction(
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { ModalProps, useDisclosure, useToast } from "@chakra-ui/react";
|
import { ModalProps, useToast } from "@chakra-ui/react";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
import { DraftNostrEvent, NostrEvent } from "../../../types/nostr-event";
|
import { DraftNostrEvent, NostrEvent } from "../../../types/nostr-event";
|
||||||
@@ -11,7 +11,6 @@ import {
|
|||||||
getCommunityLinks,
|
getCommunityLinks,
|
||||||
getCommunityMods,
|
getCommunityMods,
|
||||||
getCommunityName,
|
getCommunityName,
|
||||||
getCommunityRanking,
|
|
||||||
getCommunityRelays,
|
getCommunityRelays,
|
||||||
getCommunityRules,
|
getCommunityRules,
|
||||||
} from "../../../helpers/nostr/communities";
|
} from "../../../helpers/nostr/communities";
|
||||||
@@ -40,7 +39,7 @@ export default function CommunityEditModal({
|
|||||||
mods: getCommunityMods(community) || [],
|
mods: getCommunityMods(community) || [],
|
||||||
relays: getCommunityRelays(community) || [],
|
relays: getCommunityRelays(community) || [],
|
||||||
links: getCommunityLinks(community) || [],
|
links: getCommunityLinks(community) || [],
|
||||||
ranking: getCommunityRanking(community) || "votes",
|
// ranking: getCommunityRanking(community) || "votes",
|
||||||
}),
|
}),
|
||||||
[community],
|
[community],
|
||||||
);
|
);
|
||||||
@@ -67,7 +66,7 @@ export default function CommunityEditModal({
|
|||||||
for (const url of values.relays) draft.tags.push(["relay", url]);
|
for (const url of values.relays) draft.tags.push(["relay", url]);
|
||||||
for (const [url, name] of values.links) draft.tags.push(name ? ["r", url, name] : ["r", url]);
|
for (const [url, name] of values.links) draft.tags.push(name ? ["r", url, name] : ["r", url]);
|
||||||
|
|
||||||
if (values.ranking) draft.tags.push(["rank_mode", values.ranking]);
|
// if (values.ranking) draft.tags.push(["rank_mode", values.ranking]);
|
||||||
|
|
||||||
const signed = await requestSignature(draft);
|
const signed = await requestSignature(draft);
|
||||||
new NostrPublishAction(
|
new NostrPublishAction(
|
||||||
|
Reference in New Issue
Block a user