diff --git a/client/src/components/Home.tsx b/client/src/components/Home.tsx index 0f444d1..2d89dee 100644 --- a/client/src/components/Home.tsx +++ b/client/src/components/Home.tsx @@ -35,7 +35,7 @@ const Home = () => { const filteredAndSortedEvents = uniqEvents .filter(event => - getPow(event.id) > Math.ceil(Number(filterDifficulty)/4) && + getPow(event.id) > Number(filterDifficulty) && event.kind === 1 && !event.tags.some(tag => tag[0] === 'e') ) diff --git a/client/src/components/Settings.tsx b/client/src/components/Settings.tsx index e033f2b..38d5977 100644 --- a/client/src/components/Settings.tsx +++ b/client/src/components/Settings.tsx @@ -1,6 +1,7 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; // import {powEvent} from './system'; // import {publish} from './relays'; +import { addRelay } from '../utils/relays'; const Settings = () => { const [filterDifficulty, setFilterDifficulty] = useState(localStorage.getItem('filterDifficulty') || 20); @@ -19,42 +20,46 @@ const Settings = () => { window.dispatchEvent(event); }; - return ( -