Add host setup functions and client components
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
type Params = {
|
||||
timestamp?: number | "";
|
||||
};
|
||||
|
||||
export default function formatUnixTimestamp({ timestamp }: Params) {
|
||||
if (!timestamp) {
|
||||
return "—";
|
||||
}
|
||||
|
||||
const date = new Date(timestamp * 1000);
|
||||
|
||||
return date.toLocaleDateString("en-US", {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user