raise min diff

This commit is contained in:
smolgrrr 2024-08-27 15:30:42 +10:00
parent f4127621e1
commit 7ed89267d4
6 changed files with 9 additions and 7 deletions

View File

@ -176,7 +176,7 @@ const NewNoteCard = ({
className="bg-neutral-800 text-white text-xs font-medium border-none rounded-lg w-10"
value={difficulty}
onChange={(e) => setDifficulty(e.target.value)}
min="10" // Assuming a minimum difficulty value of 1
min="21"
/>
<button
type="button"

View File

@ -24,7 +24,7 @@ const Home = () => {
<div className="w-full px-4 sm:px-0 sm:max-w-xl mx-auto my-2">
<NewNoteCard />
</div>
<div className={`grid grid-cols-1 max-w-xl mx-auto gap-1 px-4 ${isAnimating ? 'animate-pulse' : ''}`}>
<div className={`grid grid-cols-1 max-w-xl mx-auto gap-1 ${isAnimating ? 'animate-pulse' : ''}`}>
{processedEvents.map((event) => (
<PostCard
key={event.postEvent.id}

View File

@ -79,6 +79,7 @@ const Settings = () => {
type="number"
value={filterDifficulty}
onChange={e => setFilterDifficulty(e.target.value)}
min={21}
className="w-full px-3 py-2 border rounded-md bg-black"
/>
</div>
@ -93,6 +94,7 @@ const Settings = () => {
type="number"
value={difficulty}
onChange={e => setDifficulty(e.target.value)}
min={21}
className="w-full px-3 py-2 border rounded-md bg-black"
/>
</div>

View File

@ -66,7 +66,7 @@ const Thread = () => {
</div>
<ThreadPostModal OPEvent={OPEvent} />
<div className="col-span-full h-0.5 bg-neutral-900 mb-2"/> {/* This is the white line separator */}
<div className="grid grid-cols-1 max-w-xl mx-auto gap-1 px-4">
<div className="grid grid-cols-1 max-w-xl mx-auto gap-1">
{replyEvents.map((event: Event) => (
<div className={`w-11/12 ${event.tags.find(tag => tag[0] === 'e' && tag[1] !== OPEvent.id) ? 'ml-auto' : 'mr-auto'}`}>
<PostCard

View File

@ -1 +1 @@
export const DEFAULT_DIFFICULTY = 20;
export const DEFAULT_DIFFICULTY = 21;

View File

@ -13,7 +13,7 @@ export const subGlobalFeed = (onEvent: SubCallback, age: number) => {
const now = Math.floor(Date.now() * 0.001);
const pubkeys = new Set<string>();
const notes = new Set<string>();
const prefix = Math.floor(16 / 4); // 4 bits in each '0' character
const prefix = 6; // 4 bits in each '0' character
sub({ // get past events
cb: (evt, relay) => {
pubkeys.add(evt.pubkey);
@ -301,12 +301,12 @@ export const subHashtagFeed = (
"#t": [hashtag],
kinds: [1, 6],
since: Math.floor((Date.now() * 0.001) - (age * 60 * 60)),
limit: 25,
limit: 20,
},
unsub: true
});
const prefix = Math.floor(16 / 4); // 4 bits in each '0' character
const prefix = 6; // 4 bits in each '0' character
sub({ // get past events
cb: (evt, relay) => {
pubkeys.add(evt.pubkey);