Instance | Branch |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface HttpResponse<T> extends Response { | |
parsedBody?: T; | |
} | |
interface IApiResponse<T> { | |
result: T | null; | |
errors: unknown | null; | |
statusCode: number; | |
message: string; | |
/** The raw HTTP Response */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import React, { useState } from "react"; | |
import { useServerInsertedHTML } from "next/navigation"; | |
import { ServerStyleSheet, StyleSheetManager } from "styled-components"; | |
type SSRStyledComponentRegistryProps = { | |
children: React.ReactNode; | |
}; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Validate Discord username according to the services's rules | |
* @param username the user's username | |
* @returns ```{ hasSuccessiveDots, isCaseSensitive, containsSpecialChars, breaksMinMaxLength }``` | |
* @summary It does not support the previews version: discordUSerName#1234 | |
* @see https://support.discord.com/hc/en-us/articles/12620128861463-New-Usernames-Display-Names | |
*/ | |
export const validateDiscordUsername = (username: string) => { | |
// The RegEx support this validation: | |
// ^(?!.*[.]{2,})[a-zA-Z0-9_.]{2,32}$ |