Skip to content

Commit

Permalink
Merge branch 'feature/nextjs-migrate' into gardening
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupert Redington committed Sep 11, 2021
2 parents 38de258 + 9d4ad24 commit eaf38fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
20 changes: 20 additions & 0 deletions src/api-client/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,13 @@ export type RemoveLooMutationVariables = Exact<{

export type RemoveLooMutation = { __typename?: 'Mutation', submitRemovalReport?: Maybe<{ __typename?: 'ReportMutationResponse', code: string, success: boolean, loo?: Maybe<{ __typename?: 'Loo', id?: Maybe<string>, active?: Maybe<boolean>, removalReason?: Maybe<string> }> }> };

export type SubmitVerificationReportMutationMutationVariables = Exact<{
id?: Maybe<Scalars['ID']>;
}>;


export type SubmitVerificationReportMutationMutation = { __typename?: 'Mutation', submitVerificationReport?: Maybe<{ __typename?: 'ReportMutationResponse', loo?: Maybe<{ __typename?: 'Loo', id?: Maybe<string>, verifiedAt?: Maybe<any> }> }> };

export type UpdateLooMutationVariables = Exact<{
id?: Maybe<Scalars['ID']>;
location: PointInput;
Expand Down Expand Up @@ -484,6 +491,19 @@ export const RemoveLooDocument = gql`
export type RemoveLooMutationFn = Apollo.MutationFunction<RemoveLooMutation, RemoveLooMutationVariables>;
export type RemoveLooMutationResult = Apollo.MutationResult<RemoveLooMutation>;
export type RemoveLooMutationOptions = Apollo.BaseMutationOptions<RemoveLooMutation, RemoveLooMutationVariables>;
export const SubmitVerificationReportMutationDocument = gql`
mutation submitVerificationReportMutation($id: ID) {
submitVerificationReport(id: $id) {
loo {
id
verifiedAt
}
}
}
`;
export type SubmitVerificationReportMutationMutationFn = Apollo.MutationFunction<SubmitVerificationReportMutationMutation, SubmitVerificationReportMutationMutationVariables>;
export type SubmitVerificationReportMutationMutationResult = Apollo.MutationResult<SubmitVerificationReportMutationMutation>;
export type SubmitVerificationReportMutationMutationOptions = Apollo.BaseMutationOptions<SubmitVerificationReportMutationMutation, SubmitVerificationReportMutationMutationVariables>;
export const UpdateLooDocument = gql`
mutation updateLoo($id: ID, $location: PointInput!, $name: String, $openingTimes: OpeningTimes, $accessible: Boolean, $allGender: Boolean, $men: Boolean, $women: Boolean, $children: Boolean, $urinalOnly: Boolean, $babyChange: Boolean, $radar: Boolean, $attended: Boolean, $automatic: Boolean, $noPayment: Boolean, $paymentDetails: String, $notes: String, $campaignUOL: Boolean) {
submitReport(
Expand Down
1 change: 1 addition & 0 deletions src/api-client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ export const ssrFindLoosNearby = {
usePage: useFindLoosNearby,
}


7 changes: 1 addition & 6 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { withApollo } from '../components/withApollo';
import { NextPage } from 'next';
import { getServerPageFindLooById, getServerPageFindLoosNearby, useFindLooById, useFindLoosNearby } from '../api-client/page';



/**
* SSR Migration plan
* ---
Expand All @@ -28,9 +26,6 @@ import { getServerPageFindLooById, getServerPageFindLoosNearby, useFindLooById,
* Set revalidate to throttle this by n seconds.
*/




const SIDEBAR_BOTTOM_MARGIN = 32;

const HomePage = ({ initialPosition, ...props }) => {
Expand Down Expand Up @@ -78,7 +73,7 @@ const HomePage = ({ initialPosition, ...props }) => {


/**
* TODO: Fetch loo information using SSR.
* TODO: Fetch loo information as one big blob using SSR.
*/
const [selectedLoo, setSelectedLoo] = React.useState(null);
const [loadingSelectedLoo, setLoadingSelectedLoo] = React.useState(false);
Expand Down

0 comments on commit eaf38fd

Please sign in to comment.