mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 19:51:32 +10:00
chore: remove ssr
Signed-off-by: Adithya Krishna <adithya@documenso.com>
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import type { HTMLAttributes } from 'react';
|
import type { HTMLAttributes } from 'react';
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
@ -13,34 +12,27 @@ import { Button } from '@documenso/ui/primitives/button';
|
|||||||
export type TypefullyProps = HTMLAttributes<HTMLDivElement>;
|
export type TypefullyProps = HTMLAttributes<HTMLDivElement>;
|
||||||
|
|
||||||
export const Typefully = ({ className, ...props }: TypefullyProps) => {
|
export const Typefully = ({ className, ...props }: TypefullyProps) => {
|
||||||
const [isSSR, setIsSSR] = useState(true);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setIsSSR(false);
|
|
||||||
}, []);
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col', className)} {...props}>
|
<div className={cn('flex flex-col', className)} {...props}>
|
||||||
<h3 className="px-4 text-lg font-semibold">Twitter Stats</h3>
|
<h3 className="px-4 text-lg font-semibold">Twitter Stats</h3>
|
||||||
|
|
||||||
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border py-8 shadow-sm hover:shadow">
|
<div className="border-border mt-2.5 flex flex-1 items-center justify-center rounded-2xl border py-8 shadow-sm hover:shadow">
|
||||||
{!isSSR && (
|
<div className="flex flex-col gap-y-4 text-center">
|
||||||
<div className="flex flex-col gap-y-4 text-center">
|
<Image className="opacity-75" src={Twitter} alt="Twitter Logo" width={120} />
|
||||||
<Image className="opacity-75" src={Twitter} alt="Twitter Logo" width={120} />
|
<Link href="https://typefully.com/documenso/stats" target="_blank">
|
||||||
|
<h1>Documenso on X</h1>
|
||||||
|
</Link>
|
||||||
|
<Button className="rounded-full" size="sm" asChild>
|
||||||
<Link href="https://typefully.com/documenso/stats" target="_blank">
|
<Link href="https://typefully.com/documenso/stats" target="_blank">
|
||||||
<h1>Documenso on X</h1>
|
View all stats
|
||||||
</Link>
|
</Link>
|
||||||
<Button className="rounded-full" size="sm" asChild>
|
</Button>
|
||||||
<Link href="https://typefully.com/documenso/stats" target="_blank">
|
<Button className="rounded-full bg-white" size="sm" asChild>
|
||||||
View all stats
|
<Link href="https://twitter.com/documenso" target="_blank">
|
||||||
</Link>
|
Follow us on X
|
||||||
</Button>
|
</Link>
|
||||||
<Button className="rounded-full bg-white" size="sm" asChild>
|
</Button>
|
||||||
<Link href="https://twitter.com/documenso" target="_blank">
|
</div>
|
||||||
Follow us on X
|
|
||||||
</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user