Skip to content

Commit

Permalink
fixing server side build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Grato committed Nov 28, 2023
1 parent 651f216 commit 43b10b2
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions client/pages/analytics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Card from '@Shared/Card/Card';
import { getAnalytics, HubStat } from 'services/analytics.service';
import { Button, Input, Pill } from '@mozilla/lilypad-ui';
import { useState, ChangeEvent } from 'react';
import { requireAuthenticationAndSubscription } from 'services/routeGuard.service';
import type { GetServerSidePropsContext } from 'next';

type SandboxPropsT = {
analytics: {};
Expand Down Expand Up @@ -316,12 +318,17 @@ const Sandbox = ({ analytics }: SandboxPropsT) => {

export default Sandbox;

export async function getStaticProps() {
if (process.env.ENV === 'production') {
return { notFound: true };
}
export async function getS() {}

return {
props: {},
};
}
export const getServerSideProps = requireAuthenticationAndSubscription(
(context: GetServerSidePropsContext) => {
// Your normal `getServerSideProps` code here
if (process.env.ENV === 'production') {
return { notFound: true };
}

return {
props: {},
};
}
);

0 comments on commit 43b10b2

Please sign in to comment.