Skip to content

Commit

Permalink
Merge pull request #69 from nossas/hotfix/upgrade-nextjs
Browse files Browse the repository at this point in the history
fix: remove no longer needed call after upgrade nextjs
  • Loading branch information
lpirola authored Dec 2, 2021
2 parents 9209266 + c56d99c commit b79b6e4
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 30 deletions.
22 changes: 11 additions & 11 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ pipeline:
test:
image: node:14-alpine
environment:
- PORT = 3000
- PORT=3000
- REDIS_URL=redis://127.0.0.1:6379
- ELASTIC_APM_SERVICE_NAME=nossas-org
- ELASTIC_APM_SERVER_URL=http://localhost:9200
- ELASTIC_APM_SECRET_TOKEN=1111
- ELASTIC_APM_ACTIVE=false
commands:
- apk --update add curl
- npm i
- npm run build
- npm run lint
- npm run test
- apk --update add curl
- yarn
- yarn run lint
- yarn run test
- yarn run build
publish-staging-build:
image: plugins/docker
repo: nossas/nossas-org
dockerfile: Dockerfile
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
environment:
- NEXT_PUBLIC_BONDE_API_GRAPHQL_URL=wss://api-graphql.staging.bonde.org/v1/graphql
- NEXT_PUBLIC_DONATION_EN_WIDGET_ID=66736
Expand Down Expand Up @@ -79,15 +79,15 @@ pipeline:
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
- NODE_ENV
dockerfile: Dockerfile
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
group: builder
tags:
- ${DRONE_TAG##v}
- latest
when:
status: success
event: [tag]

nossas-org-staging-deploy:
image: peloton/drone-rancher
url: http://cluster.bonde.org
Expand All @@ -96,11 +96,11 @@ pipeline:
docker_image: nossas/nossas-org:${DRONE_BRANCH/\//-}
timeout: 360
confirm: true
secrets: [ rancher_access_key, rancher_secret_key ]
secrets: [rancher_access_key, rancher_secret_key]
when:
status: success
event: [push]

nossas-org-production-deploy:
image: peloton/drone-rancher
url: http://cluster.bonde.org
Expand Down
2 changes: 1 addition & 1 deletion components/Donation/DonationDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Donation: React.FC<DonationProps> = ({
}) => {
const { isOpen, onOpen, onClose } = disclosureOpts;
const btnRef = React.useRef();
const t = (i18nKey: string, _?: any) => i18nKey;
// const t = (i18nKey: string, _?: any) => i18nKey;

return (
<Form>
Expand Down
2 changes: 1 addition & 1 deletion components/Employee/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Box, Stack, Heading, Text, SimpleGrid, Grid } from "@chakra-ui/react";
import { Box, Stack, Heading, Text, Grid } from "@chakra-ui/react";

import { EmployeeItem } from "./EmployeeItem";

Expand Down
2 changes: 1 addition & 1 deletion components/Form/InputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const InputField: React.FC<InputFieldProps> = ({
validate,
...props
}) => {
const [field, meta, helpers] = useField({ name, validate });
const [field, meta] = useField({ name, validate });
const borderStyles = {
border: "1px solid",
borderRadius: 4,
Expand Down
2 changes: 1 addition & 1 deletion components/Form/SelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SelectWidget: React.FC<SelectWidgetProps> = ({
options: { items, type },
...props
}) => {
const [field, meta, helpers] = useField(name);
const [field, meta] = useField(name);

let values = {};
if (type !== "object") items.forEach((v: string) => (values[v] = v));
Expand Down
2 changes: 0 additions & 2 deletions components/Form/SubmitFormEntry.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React, { useState } from "react";
import { gql, useMutation } from "@apollo/client";
import { Text } from "@chakra-ui/react";
import SuccessPanel from "./SuccessPanel";

const CREATE_FORM_ENTRY_GQL = gql`
mutation(
Expand Down
1 change: 1 addition & 0 deletions components/Navbar/Elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const Nav = ({ children }) => {
const [offset, setOffset] = useState(0);
const [scrollUp, setScrollUp] = useState(true);

console.log(offset);
useEffect(() => {
window.onscroll = () => {
setOffset((oldOffset) => {
Expand Down
1 change: 0 additions & 1 deletion components/Navbar/MenuItemsMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
AccordionItem,
AccordionButton,
AccordionPanel,
AccordionIcon,
Box,
Link as LinkStyled,
Stack,
Expand Down
4 changes: 0 additions & 4 deletions lib/withApollo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
// import App from 'next/app';
import Head from "next/head";
import { ApolloProvider } from "@apollo/react-hooks";
import createApolloClient from "./apolloClient";
// import auth0 from './auth0';
Expand Down Expand Up @@ -150,9 +149,6 @@ export const withApollo = ({ ssr = true }: any = {}) => (
// https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-error
console.error("Error while running `getDataFromTree`", error);
}
// getDataFromTree does not call componentWillUnmount
// head side effect therefore need to be cleared manually
Head.rewind();
}
}

Expand Down
4 changes: 3 additions & 1 deletion theme/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const _disabled = {
opacity: "1",
};

export default {
const _default = {
baseStyle: {
_focus: {
boxShadow: "none",
Expand Down Expand Up @@ -89,3 +89,5 @@ export default {
variant: "solid",
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Heading.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
baseStyle: {
fontWeight: 200,
},
Expand Down Expand Up @@ -30,3 +30,5 @@ export default {
size: "lg",
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Input.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
variants: {
outline: {
field: {
Expand All @@ -13,3 +13,5 @@ export default {
},
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Link.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
baseStyle: {
fontWeight: "bold",
_focus: {
Expand Down Expand Up @@ -47,3 +47,5 @@ export default {
size: "md",
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const itemStyle = {
color: "white !important",
};

export default {
const _default = {
baseStyle: {
list: {
bg: "blue.main",
Expand All @@ -24,3 +24,5 @@ export default {
},
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Select.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
variants: {
outline: {
field: {
Expand All @@ -13,3 +13,5 @@ export default {
},
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/Text.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
defaultStyles: {
fontWeight: "normal",
},
Expand Down Expand Up @@ -31,3 +31,5 @@ export default {
size: "md",
},
};

export default _default;
4 changes: 3 additions & 1 deletion theme/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const _default = {
black: "#000000",
white: "#FFFFFF",
red: "#FF2B4E",
Expand All @@ -20,3 +20,5 @@ export default {
light: "#F10991",
},
};

export default _default;

0 comments on commit b79b6e4

Please sign in to comment.