minor improvement
This commit is contained in:
parent
c18a5f4162
commit
17d1cb45e3
|
@ -7,6 +7,7 @@ import { dropdownTriggerer } from "@/lib/client/utils";
|
||||||
import Button from "../ui/Button";
|
import Button from "../ui/Button";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
import { useAddToken } from "@/hooks/store/tokens";
|
import { useAddToken } from "@/hooks/store/tokens";
|
||||||
|
import CopyButton from "../CopyButton";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onClose: Function;
|
onClose: Function;
|
||||||
|
@ -68,21 +69,14 @@ export default function NewTokenModal({ onClose }: Props) {
|
||||||
<div className="flex flex-col justify-center space-y-4">
|
<div className="flex flex-col justify-center space-y-4">
|
||||||
<p className="text-xl font-thin">{t("access_token_created")}</p>
|
<p className="text-xl font-thin">{t("access_token_created")}</p>
|
||||||
<p>{t("token_creation_notice")}</p>
|
<p>{t("token_creation_notice")}</p>
|
||||||
<TextInput
|
<div className="relative">
|
||||||
spellCheck={false}
|
<div className="w-full hide-scrollbar overflow-x-auto whitespace-nowrap rounded-md p-2 bg-base-200 border-neutral-content border-solid border flex items-center gap-2 justify-between pr-14">
|
||||||
value={newToken}
|
{newToken}
|
||||||
onChange={() => {}}
|
<div className="absolute right-0 px-2 border-neutral-content border-solid border-r bg-base-200">
|
||||||
className="w-full"
|
<CopyButton text={newToken} />
|
||||||
/>
|
</div>
|
||||||
<button
|
</div>
|
||||||
onClick={() => {
|
</div>
|
||||||
navigator.clipboard.writeText(newToken);
|
|
||||||
toast.success(t("copied_to_clipboard"));
|
|
||||||
}}
|
|
||||||
className="btn btn-primary w-fit mx-auto"
|
|
||||||
>
|
|
||||||
{t("copy_to_clipboard")}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
Ŝarĝante…
Reference in New Issue