Skip to content

Commit

Permalink
App: 🐛 Fix some TS errors from emails fix and prerender landing page (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckcarpenter authored Apr 15, 2024
1 parent f35e0f0 commit 5d7c440
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/api/src/services/emails/emails.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EmailInput, QueryResolvers } from 'types/graphql';
import type { EmailInput, MutationResolvers, QueryResolvers } from 'types/graphql';

import { ValidationError } from '@redwoodjs/graphql-server';
import type { MailResult } from '@redwoodjs/mailer-core';
Expand All @@ -10,7 +10,7 @@ import { WelcomeEmail } from 'src/mail/Welcome/Welcome';

const defaultEmail = 'Shepherd Pro <hello@shepherdpro.com>';

export const sendDemoRequest: QueryResolvers['sendDemoRequest'] = async ({
export const sendDemoRequest: MutationResolvers['sendDemoRequest'] = async ({
input,
}) => {
logger.debug(input, 'creating demo email ...');
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { AuthProvider, useAuth } from './auth';
import './scaffold.css';
import './index.css';

if (process.env.POSTHOG_API_KEY) {
if (process.env.POSTHOG_API_KEY && typeof window !== 'undefined') {
posthog.init(process.env.POSTHOG_API_KEY, {
loaded: (posthog) => {
if (process.env.NODE_ENV === 'development') posthog.debug();
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Routes = () => {
<Route path="/reset-password" page={ResetPasswordPage} name="resetPassword" />
</Set>
<Set wrap={SignupLandingLayout}>
<Route path="/" page={SignUpContactPage} name="signUpContact" />
<Route path="/" page={SignUpContactPage} name="signUpContact" prerender />
</Set>
<Set wrap={BaseLayout}>
<Route notfound page={NotFoundPage} />
Expand Down
4 changes: 2 additions & 2 deletions app/web/src/components/DemoDialog/DemoDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const DemoDialog = () => {
}
}
});
if (response.error) {
toast(response.error.message);
if (response.errors) {
toast(response.errors[0].message);
} else {
toast.success("Thank you! We'll be in touch soon.");
}
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/pages/SignUpContactPage/SignUpContactPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const SignupPageContact = () => {
/>
</div>
</div>
<p className="mr-12 w-full p-4 font-body text-2xl lg:w-1/2">
<p className="w-full p-4 font-body text-2xl lg:w-1/2">
{`Shepherd Pro builds on the openness and expandability of the open
source library, then adds analytics in order to significantly enhance
the understanding of user interactions within a journey. Track how
Expand Down

0 comments on commit 5d7c440

Please sign in to comment.