chore: remove the "-temp" part of the shortcut name in the extension ()

* increase random id size in shortcut

* remove the temp part of the shortcut name
This commit is contained in:
Liam 2023-12-08 01:38:57 +00:00 committed by GitHub
parent 263812f98f
commit c45a48966d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@ import { Visibility } from "@/types/proto/api/v2/common";
import { CreateShortcutResponse, OpenGraphMetadata } from "@/types/proto/api/v2/shortcut_service";
import Icon from "./Icon";
const generateTempName = (length = 6) => {
const generateName = (length = 8) => {
let result = "";
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
const charactersLength = characters.length;
@ -54,7 +54,7 @@ const CreateShortcutsButton = () => {
const tab = tabs[0];
setState((state) => ({
...state,
name: generateTempName() + "-temp",
name: generateName(),
title: tab.title || "",
link: tab.url || "",
}));