Fixed 'use client' usage.
This commit is contained in:
25
src/app/share/[...shareId]/SharePage.tsx
Normal file
25
src/app/share/[...shareId]/SharePage.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
'use client';
|
||||
import WebsiteDetails from 'app/(main)/websites/[websiteId]/WebsiteDetails';
|
||||
import { useShareToken } from 'components/hooks';
|
||||
import Page from 'components/layout/Page';
|
||||
import Header from './Header';
|
||||
import Footer from './Footer';
|
||||
import styles from './SharePage.module.css';
|
||||
|
||||
export default function SharePage({ shareId }) {
|
||||
const { shareToken, isLoading } = useShareToken(shareId);
|
||||
|
||||
if (isLoading || !shareToken) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Page>
|
||||
<Header />
|
||||
<WebsiteDetails websiteId={shareToken.websiteId} />
|
||||
<Footer />
|
||||
</Page>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user