mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-02 19:26:50 -05:00
17 lines
464 B
TypeScript
17 lines
464 B
TypeScript
import { UseToastOptions } from "@chakra-ui/react";
|
|
import { Serialized } from "./types";
|
|
|
|
export const getToastOptions = (
|
|
description: NonNullable<UseToastOptions["description"]>,
|
|
status: NonNullable<UseToastOptions["status"]>
|
|
): UseToastOptions => ({
|
|
description,
|
|
status,
|
|
duration: 7000,
|
|
isClosable: true,
|
|
position: "top-right",
|
|
});
|
|
|
|
export const serializeDataForGetStaticProps = <T>(data: T): Serialized<T> =>
|
|
JSON.parse(JSON.stringify(data));
|