chore: cleanup
This commit is contained in:
parent
4d197aaeea
commit
cb17cead0f
@ -1,2 +1,3 @@
|
||||
VITE_APP_NAME=slidestr.net
|
||||
VITE_PUBLIC_URL=https://slidestr.net
|
||||
VITE_IMAGE_PROXY=https://imgproxy.slidestr.net
|
||||
|
@ -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 = () => {
|
||||
|
@ -29,7 +29,7 @@ const AuthorProfile = ({
|
||||
const avatarLoaded = useImageLoaded(src);
|
||||
const { nav, currentSettings } = useNav();
|
||||
const session = useSession();
|
||||
|
||||
|
||||
const followButtonAvailable = followButton && session?.pubkey;
|
||||
|
||||
return (
|
||||
|
@ -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 })
|
||||
|
@ -15,8 +15,8 @@ const Layout = () => {
|
||||
const [showLogin, setShowLogin] = useState(false);
|
||||
const logOut = useLogOut();
|
||||
const session = useSession();
|
||||
|
||||
const profile = useProfile(session?.pubkey || '', NDKSubscriptionCacheUsage.CACHE_FIRST);
|
||||
|
||||
const profile = useProfile(session?.pubkey || '', NDKSubscriptionCacheUsage.CACHE_FIRST);
|
||||
|
||||
// useEffect(() => {
|
||||
// if (currentSettings.npubs.length == 0 && currentSettings.tags.length == 0) {
|
||||
@ -28,7 +28,6 @@ const Layout = () => {
|
||||
logOut();
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
{showLogin && <Login onClose={() => setShowLogin(false)} />}
|
||||
|
@ -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,
|
||||
|
@ -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[];
|
||||
|
Loading…
Reference in New Issue
Block a user