This file contains hidden or 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
import { type ClassValue, clsx } from 'clsx'; | |
import { twMerge } from 'tailwind-merge'; | |
export function cn(...inputs: ClassValue[]) { | |
return twMerge(clsx(inputs)); | |
} |
This file contains hidden or 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
[ | |
{ | |
"country": "Afganistán", | |
"countryCode": 93, | |
"code": "AF", | |
"flag": "https://flagcdn.com/af.svg", | |
"emoji": "🇦🇫", | |
"latinAmerica": false, | |
"phoneLength": 9, | |
}, |
This file contains hidden or 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
export const dateFormat = (date) => { | |
const newDate = new Date(date.split("T")[0].split("-")); | |
const options = { | |
year: "numeric", | |
month: "long", | |
day: "numeric", | |
}; | |
return newDate.toLocaleDateString("es-ES", options); |
This file contains hidden or 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
export const searchUsers = async (req, res) => { | |
const { user } = req; | |
const { q, active } = req.query; | |
// Verify profiles | |
if (!user.profiles.includes("admin")) { | |
return res.status(401).json({ | |
response: "error", | |
msg: "No permissions", | |
type: "no-permissions", |
This file contains hidden or 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
import cloudinary from "cloudinary"; | |
cloudinary.v2.config({ | |
cloud_name: [CLOUDINARY_NAME], | |
api_key: [CLOUDINARY_API_KEY], | |
api_secret: [CLOUDINARY_API_SECRET], | |
}); | |
// Subir archivo a cloudinary | |
export const uploadAvatar = async (file) => { |
This file contains hidden or 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
::-webkit-scrollbar { | |
width: 3px; | |
} | |
::-webkit-scrollbar-thumb { | |
background: "#000"; | |
border-radius: 10px; | |
} |