Compare commits

...

2 Commits

Author SHA1 Message Date
943da9c7e8 Merge pull request 'Store the current slug when accessing the website directly' (#278) from fix/slug-website into main
All checks were successful
Check usage of free licenses / build-static-assets (push) Successful in 37s
Playwright Tests / test (push) Successful in 4m2s
Build Nginx-based docker image / build-static-assets (push) Successful in 4m23s
Reviewed-on: #278
2025-06-12 17:11:22 +00:00
cc698102f2 Store the current slug when accessing the website directly
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 30s
Add copyright notice / copyright_notice (pull_request) Successful in 58s
Build Nginx-based docker image / build-static-assets (push) Successful in 2m58s
Playwright Tests / test (pull_request) Successful in 4m25s
2025-06-12 19:06:23 +02:00

View File

@ -6,8 +6,16 @@ import { AbstractApi } from '@/app/api/abstract-api';
import { Website, WebsiteSerializer } from '@/app/lib/website';
import { useState, useEffect } from 'react';
import DOMPurify from "dompurify";
import { useParams } from 'next/navigation';
export default function Page() {
const params = useParams<{ slug: string }>()
useEffect(() => {
if (typeof window !== 'undefined') {
localStorage.setItem('slug', params.slug);
}
}, []);
const [websiteContent, setWebsiteContent] = useState<string>("");