Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App: 🐛 Fix some TS errors from emails fix and prerender landing page #2724

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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