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
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
This commit is contained in:
parent
79f499b8a6
commit
cc698102f2
@ -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>("");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user