silverwolf-x's picture
download
raw
1.29 kB
import Container from "./container";
import cn from "classnames";
import { EXAMPLE_PATH } from "@/lib/constants";
type AlertProps = {
preview: boolean;
};
const Alert = (props: AlertProps) => {
const { preview } = props;
return (
<div
className={cn("border-b", {
"bg-accent-7 border-accent-7 text-white": preview,
"bg-accent-1 border-accent-2": !preview,
})}
>
<Container>
<div className="py-2 text-center text-sm">
{preview ? (
<>
This page is a preview.{" "}
<a
href="/api/exit-preview"
className="underline hover:text-cyan duration-200 transition-colors"
>
Click here
</a>{" "}
to exit preview mode.
</>
) : (
<>
The source code for this blog is{" "}
<a
href={`https://github.com/vercel/next.js/tree/canary/examples/${EXAMPLE_PATH}`}
className="underline hover:text-success duration-200 transition-colors"
>
available on GitHub
</a>
.
</>
)}
</div>
</Container>
</div>
);
};
export default Alert;

Xet Storage Details

Size:
1.29 kB
·
Xet hash:
704dabcf07a90e24926a1daf9cbd316d66726b2b58cf9f0b6048b4012981052a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.