chore: cleanup

This commit is contained in:
florian 2024-03-08 20:19:56 +00:00
parent 4d197aaeea
commit cb17cead0f
7 changed files with 11 additions and 8 deletions

View File

@ -1,2 +1,3 @@
VITE_APP_NAME=slidestr.net
VITE_PUBLIC_URL=https://slidestr.net
VITE_IMAGE_PROXY=https://imgproxy.slidestr.net

View File

@ -10,12 +10,13 @@ import Layout from './components/Layout/Layout';
import SlideShow from './components/SlideShow';
const cacheAdapterDexie = new NDKCacheAdapterDexie({ dbName: 'slidestr' });
const ndk = new NDK({
explicitRelayUrls: defaultRelays,
outboxRelayUrls: ['wss://purplepag.es'],
enableOutboxModel: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
cacheAdapter: cacheAdapterDexie as any, // types don't in the current version
cacheAdapter: cacheAdapterDexie as any, // types don't match in the current version
});
const App = () => {

View File

@ -1,4 +1,4 @@
import { topics } from '../env';
import { publicUrl, topics } from '../env';
import useNav from '../../utils/useNav';
import './Home.css';
import usePeopleLists from '../../utils/useLists';
@ -35,7 +35,7 @@ const Home = () => {
key={tk}
className="topic"
style={{
backgroundImage: `linear-gradient(170deg, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%), url(${createImgProxyUrl('https://slidestr.net/images/' + tk + '.jpg', 600, -1)})`,
backgroundImage: `linear-gradient(170deg, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0) 100%), url(${createImgProxyUrl(publicUrl + '/images/' + tk + '.jpg', 600, -1)})`,
}}
onClick={() =>
nav({ ...currentSettings, topic: tk, npubs: [], tags: [], list: undefined, follows: false, showAdult })

View File

@ -28,7 +28,6 @@ const Layout = () => {
logOut();
};
return (
<>
{showLogin && <Login onClose={() => setShowLogin(false)} />}

View File

@ -90,7 +90,7 @@ const SlideShow = () => {
const session = useSession();
const profile = useProfile(session?.pubkey || ' ');
const userNPub = session ? nip19.npubEncode(session?.pubkey) as string : undefined;
const userNPub = session ? (nip19.npubEncode(session?.pubkey) as string) : undefined;
const { zapClick, heartClick, zapState, heartState, repostClick, repostState } = useZapsAndReations(
state.activeImage,

View File

@ -4,6 +4,8 @@ export const imageProxy = import.meta.env.VITE_IMAGE_PROXY || 'https://imgproxy.
export const appName = import.meta.env.VITE_APP_NAME || 'slidestr.net';
export const publicUrl = import.meta.env.VITE_PUBLIC_URL || 'https://slidestr.net';
type Topic = {
name?: string;
tags: string[];