refactoring

This commit is contained in:
2024-07-02 11:59:58 +02:00
parent 1971966099
commit 30e62b397d
2 changed files with 1 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
'server only'
import { ReactNode } from "react";
import Gens from "./gens";
function truncateString(str:string = '', num:number = 255) {
if (str.length > num) {
return str.slice(0, num) + "...";
} else {
return str;
}
}
export { Gens, truncateString }
export const aifa = (a: ReactNode, b: ReactNode) => (a ? a : b);