time GSSP
This commit is contained in:
parent
6a12d0cd93
commit
067d0d97c4
@ -114,10 +114,9 @@ export function withPageAuthRequired<Props extends EmptyProps = EmptyProps>(
|
||||
};
|
||||
}
|
||||
|
||||
const getServerSidePropsResult = await getServerSideProps(
|
||||
context,
|
||||
user,
|
||||
);
|
||||
const start = Date.now();
|
||||
const getServerSidePropsResult = await getServerSideProps(context, user);
|
||||
console.log("getServerSideProps took", Date.now() - start);
|
||||
if (!hasProps(getServerSidePropsResult)) {
|
||||
return getServerSidePropsResult;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ const Keypad: NextPage<Props> = () => {
|
||||
|
||||
const ZeroDigit: FunctionComponent = () => {
|
||||
return (
|
||||
<div className="text-3xl cursor-pointer">
|
||||
<div className="text-3xl cursor-pointer select-none">
|
||||
0 <DigitLetters>+</DigitLetters>
|
||||
</div>
|
||||
);
|
||||
@ -117,12 +117,6 @@ const pressBackspaceAtom = atom(
|
||||
},
|
||||
);
|
||||
|
||||
export const getServerSideProps = withPageOnboardingRequired(
|
||||
async (context, user) => {
|
||||
return {
|
||||
props: { userId: user.id, ddd: 23 as const },
|
||||
};
|
||||
},
|
||||
);
|
||||
export const getServerSideProps = withPageOnboardingRequired();
|
||||
|
||||
export default Keypad;
|
||||
|
@ -46,12 +46,13 @@ const Messages: NextPage<Props> = ({ conversations }) => {
|
||||
};
|
||||
|
||||
type Recipient = string;
|
||||
export type Conversation = Record<Recipient, Sms[]>;
|
||||
|
||||
export const getServerSideProps = withPageOnboardingRequired(
|
||||
async (context, user) => {
|
||||
const customer = await findCustomer(user.id);
|
||||
const messages = await findCustomerMessages(user.id);
|
||||
const [customer, messages] = await Promise.all([
|
||||
findCustomer(user.id),
|
||||
findCustomerMessages(user.id),
|
||||
]);
|
||||
|
||||
let conversations: Record<Recipient, Sms> = {};
|
||||
for (const message of messages) {
|
||||
|
Loading…
Reference in New Issue
Block a user