Skip to content
Snippets Groups Projects
create-gweet-wrapper.tsx 693 B
"use client";

import { useState } from "react";

import { CreateGweet } from "./create-gweet";

export const CreateGweetWrapper = ({
  replyToGweetId,
}: {
  replyToGweetId: string | null;
}) => {
  const [isComment, setIsComment] = useState(true);

  return (
    <div className="relative border-b border-border">
      <CreateGweet
        replyToGweetId={replyToGweetId}
        placeholder="Gweet your reply"
        isComment={isComment}
      />
      {isComment && (
        <button
          onClick={() => {
            setIsComment(false);
          }}
          className="absolute top-0 right-0 w-full h-full z-1 pointer-events-auto"
        ></button>
      )}
    </div>
  );
};