2 Commits

Author SHA1 Message Date
Hördle Bot
898d2f5959 Add NewsSection to genre and special pages 2025-11-25 14:22:07 +01:00
Hördle Bot
a7aec80f39 Fix: Link special in news section 2025-11-25 13:59:32 +01:00
3 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import Game from '@/components/Game'; import Game from '@/components/Game';
import NewsSection from '@/components/NewsSection';
import { getOrCreateDailyPuzzle } from '@/lib/dailyPuzzle'; import { getOrCreateDailyPuzzle } from '@/lib/dailyPuzzle';
import Link from 'next/link'; import Link from 'next/link';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
@@ -102,6 +103,7 @@ export default async function GenrePage({ params }: PageProps) {
</div> </div>
)} )}
</div> </div>
<NewsSection />
<Game dailyPuzzle={dailyPuzzle} genre={decodedGenre} /> <Game dailyPuzzle={dailyPuzzle} genre={decodedGenre} />
</> </>
); );

View File

@@ -1,4 +1,5 @@
import Game from '@/components/Game'; import Game from '@/components/Game';
import NewsSection from '@/components/NewsSection';
import { getOrCreateSpecialPuzzle } from '@/lib/dailyPuzzle'; import { getOrCreateSpecialPuzzle } from '@/lib/dailyPuzzle';
import Link from 'next/link'; import Link from 'next/link';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
@@ -94,6 +95,7 @@ export default async function SpecialPage({ params }: PageProps) {
))} ))}
</div> </div>
</div> </div>
<NewsSection />
<Game <Game
dailyPuzzle={dailyPuzzle} dailyPuzzle={dailyPuzzle}
genre={decodedName} genre={decodedName}

View File

@@ -2,6 +2,7 @@
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import Link from 'next/link';
interface NewsItem { interface NewsItem {
id: number; id: number;
@@ -143,9 +144,16 @@ export default function NewsSection() {
{item.special && ( {item.special && (
<> <>
<span></span> <span></span>
<span style={{ color: '#be185d' }}> <Link
href={`/special/${item.special.name}`}
style={{
color: '#be185d',
textDecoration: 'none',
fontWeight: '500'
}}
>
{item.special.name} {item.special.name}
</span> </Link>
</> </>
)} )}
</div> </div>