<script setup> import ref, onMounted from 'vue'; import io from 'socket.io-client'; import PostCard from '@/components/PostCard.vue'; import SubmitModal from '@/components/SubmitModal.vue'; import fetchCurrentTheme, fetchFeed from '@/api';
<SubmitModal v-if="showSubmit" @close="showSubmit = false" @submitted="onSubmitted"/> </section> </template> nevernight vk
const posts = ref([]); const currentTheme = ref({}); const showSubmit = ref(false); const socket = io(import.meta.env.VITE_WS_URL); onMounted from 'vue'
-- Posts CREATE TABLE posts ( id BIGSERIAL PRIMARY KEY, user_id BIGINT REFERENCES users(vk_id), type TEXT CHECK (type IN ('photo','video','text')), media_url TEXT, text_body TEXT, created_at TIMESTAMP DEFAULT now(), theme_id BIGINT REFERENCES themes(id) ); import io from 'socket.io-client'