frontend/src/routes/layout.tsx
grngxd 8e5dff01c0 chore: update dependencies and improve dashboard settings
- Updated Qwik and Qwik City to version 1.15.0
- Updated Tailwind CSS and related plugins to latest versions
- Added a new Settings component to manage user settings
- Integrated settings management into the OSBar component
- Improved file display in the dashboard with better responsiveness
- Enhanced error handling for user info fetching
- Removed unused id from Testimonials component
2025-07-29 21:27:49 +01:00

40 lines
No EOL
843 B
TypeScript

import { $, component$, Slot, useOnDocument, useVisibleTask$ } from '@builder.io/qwik';
import AOS from 'aos';
import 'aos/dist/aos.css';
import { useNanostore$ } from '~/hooks/nanostores';
import { api } from '~/lib/api';
import { userInfo } from '~/lib/stores';
import { StereoUser } from '~/lib/types';
export default component$(() => {
const info = useNanostore$<StereoUser>(userInfo);
useVisibleTask$(async () => {
try {
info.value = await api.me();
} catch (err) {
console.error("failed to fetch user info:", err);
}
})
useOnDocument("DOMContentLoaded", $(async () => {
AOS.init({
once: true,
duration: 1000,
offset: 100,
easing: 'ease-in-out',
});
}))
return (
<div
class="
flex flex-col
min-h-screen w-full overflow-x-clip
bg-neutral-950 text-white
">
<Slot />
</div>
);
});