import { Show, createSelector, createContext } from 'solid-js'; import { Atom, atom, reflect, useSingleAsync } from '@cn-ui/use'; import { PanelContext } from '../src/components/Panel'; import { Gallery } from './Gallery'; import { DetailPanel } from './Panels/Detail'; import { StoreData } from '../src/api/notion'; import { useGalleryInfo } from './useGalleryInfo'; import { throttle } from 'lodash-es'; import { keepStore, useStorage } from '../src/use/useStorage'; import { Background } from '../src/components/Background'; import { ScrollLoading } from './ScrollLoading'; import { useWindowResize } from '../src/use/useWindowResize'; import { SearchBar } from './SearchBar'; export const GalleryGlobal = createContext< { username: Atom; backgroundImage: Atom; ShowingPicture: Atom; } & ReturnType >(); export const App = () => { const username = atom(''); keepStore('username', username, true); const backgroundImage = atom(''); keepStore('gallery:backgroundImage', backgroundImage, true); const galleryInfo = useGalleryInfo(); const visibleId = atom(''); const ShowingPicture = atom(null); const { width } = useWindowResize(); const columns = reflect(() => { const w = width(); if (w < 300) { return 1; } else if (w < 600) { return 2; } else if (w < 1200) { return 3; } else { return 4; } }); return (
魔导绪论图库
); };