Skip to content

Commit 9e1da3a

Browse files
authored
fix: fix typos in ssr section of migration guide (#6609)
* fix: import listTodos from queries instead of mutations * fix: renames posts to todos
1 parent 1dc5709 commit 9e1da3a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/fragments/lib/troubleshooting/common/upgrading.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -878,11 +878,11 @@ class MyClass {
878878
Hub.listen('auth', (data) => {
879879
const { payload } = data;
880880
this.onAuthEvent(payload);
881-
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
881+
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
882882
})
883883
}
884884
885-
onAuthEvent(payload) {
885+
onAuthEvent(payload) {
886886
// ... your implementation
887887
}
888888
}
@@ -924,11 +924,11 @@ class MyClass {
924924
Hub.listen('auth', (data) => {
925925
const { payload } = data;
926926
this.onAuthEvent(payload);
927-
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
927+
console.log('A new auth event has happened: ', data.payload.data.username + ' has ' + data.payload.event);
928928
})
929929
}
930930
931-
onAuthEvent(payload) {
931+
onAuthEvent(payload) {
932932
// ... your implementation
933933
}
934934
}
@@ -974,7 +974,7 @@ const getServerSideProps = async ({ req }) => {
974974
975975
return {
976976
props: {
977-
posts: data.listTodos.items
977+
todos: data.listTodos.items
978978
}
979979
};
980980
};
@@ -987,7 +987,7 @@ const getServerSideProps = async ({ req }) => {
987987
```js
988988
import { createServerRunner } from '@aws-amplify/adapter-nextjs';
989989
import { generateServerClientUsingReqRes } from '@aws-amplify/adapter-nextjs/api';
990-
import { listTodos } from './graphql/mutations';
990+
import { listTodos } from './graphql/queries';
991991
import amplifyConfig from './amplifyconfiguration.json';
992992
993993
const { runWithAmplifyServerContext } = createServerRunner({
@@ -1017,7 +1017,7 @@ const getServerSideProps = async ({ req, res }) => {
10171017
10181018
return {
10191019
props: {
1020-
posts: data.listTodos.items
1020+
todos: data.listTodos.items
10211021
}
10221022
};
10231023
};

0 commit comments

Comments
 (0)