feat(): use labels translations for astro components and giscus

This commit is contained in:
Eduardo Roth
2023-12-19 23:31:04 -06:00
parent 022d72296a
commit ca9f054848
9 changed files with 42 additions and 30 deletions

View File

@@ -6,19 +6,20 @@ import Author from './Author.astro';
import ChallengeFooter from './ChallengeFooter.astro';
import CommentSection from './CommentSection.astro';
const { labels } = Astro.props;
const {challenge} = Astro.props.entry.data;
const author = Astro.props.entry.data.author ? await getEntry(Astro.props.entry.data.author) : null;
const renderCommentSection = !Astro.props.entry.data.noCommentSection;
---
{ challenge?.number && author && <Author {...author.data}/> }
{ challenge?.number && author && <Author {...author.data} {labels}/> }
<Default {...Astro.props}><slot /></Default>
{challenge?.number && <ChallengeFooter {...Astro.props} />}
{ renderCommentSection && <CommentSection /> }
{ renderCommentSection && <CommentSection {...Astro.props} /> }
<style>
.author {