Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 10, 2024
1 parent b44ab77 commit 6150224
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Auth/Signup/ChooseUsername.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const SignupMessage = () => (

const validationSchema = object({
username: string()
.min(5, { message: "Username must be at least 5 characters long" })
.min(3, { message: "Username must be at least 3 characters long" })
.max(26, { message: "Username must be at most 26 characters long" })
.regex(Regex.username, {
message:
Expand Down Expand Up @@ -64,7 +64,7 @@ const ChooseUsername: FC = () => {

const username = form.watch("username");

const canCheck = Boolean(username && username.length > 4);
const canCheck = Boolean(username && username.length > 2);
const isInvalid = !form.formState.isValid;

useAccountQuery({
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/helpers/uploadToIPFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const uploadToIPFS = async (data: File[]): Promise<StorageNodeResponse[]> => {
});

return attachments;
} catch {
} catch (error) {
console.error(error);
return [];
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/data/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const EDITOR_GROUP = "([\\dA-Za-z]\\w*)"; // This will start searching for group
export const Regex = {
cashtag: /(\$\w*[A-Za-z]\w*)/g,
ethereumAddress: /^(0x)?[\da-f]{40}$/i,
username: /^[\dA-Za-z]\w{4,25}$/g,
username: /^[\dA-Za-z]\w{2,25}$/g,
hashtag: /(#\w*[A-Za-z]\w*)/g,
// Match string like @lens/someone.
mention: new RegExp(
Expand Down

0 comments on commit 6150224

Please sign in to comment.