feat: string hooks

This commit is contained in:
TrèsAbhi committed 2026-01-13 20:15:55 -06:00
1 parent f5f3f70e35
commit 27abf1b0de
7 files changed
+82 -12

No files matched your search

@@ -1,12 +1,25 @@
import { AvatarCard } from "../../../components/AvatarCard";
import { api } from "../../../core/api/dynamic";
import { useAwait } from "../../../hooks/useAwait";
import { LocaleProvider } from "../../../hooks/useLocale";
interface Props {
interface PageProps extends ContentProps {
locale: string;
}
export function Page({ locale, ...props }: PageProps) {
return (
<LocaleProvider locale={locale}>
<Content {...props} />
</LocaleProvider>
);
}
interface ContentProps {
skeleton?: boolean;
}
export function Page({ skeleton }: Props) {
function Content({ skeleton }: ContentProps) {
const { avatars } = useAwait(() => api.avatars(), "avatars");
return (
@@ -18,8 +18,8 @@ const { locale } = Astro.props;
<BaseLayout {locale} accent="gold">
<Section>
<Page client:only="react">
<Page skeleton slot="fallback" />
<Page {locale} client:only="react">
<Page {locale} skeleton slot="fallback" />
</Page>
</Section>
</BaseLayout>