Conversation
| $body-background-color: white | ||
| $primary: $yellow | ||
| $spacing-values: ("0": 0, "1": 0.25rem, "2": 0.5rem, "3": 0.75rem, "4": 1rem, "5": 1.5rem, "6": 3rem, "7": 4.5rem,"8": 6rem, "9": 9rem, "auto": auto) !default | ||
|
|
There was a problem hiding this comment.
This will enable us do use classNames with *-7, *-8 or *-9 instead of using the style prop of the component. Bulma comes with *-6 as max. https://bulma.io/documentation/helpers/spacing-helpers/
| "redux": "^4.1.0", | ||
| "redux-persist": "^6.0.0", | ||
| "redux-persist-cookie-storage": "^1.0.0", | ||
| "redux-thunk": "^2.3.0", | ||
| "sass": "^1.49.8", | ||
| "string-strip-html": "8.3.0", | ||
| "prettier": "^2.7.1", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-prettier": "^4.0.0" |
There was a problem hiding this comment.
"react-redux": "^7.2.4", => removed
"redux": "^4.1.0", => removed
"redux-persist": "^6.0.0", => removed
"redux-persist-cookie-storage": "^1.0.0", => removed
"redux-thunk": "^2.3.0", => removed
"sass": "^1.49.8", => moved to dev dependencies, only used at build time
"prettier": "^2.7.1", => moved to dev dependencies
"eslint-config-prettier": "^8.5.0" => moved to dev dependencies https://github.com/prettier/eslint-config-prettier#installation
"eslint-plugin-prettier": "^4.0.0" => moved to dev dependencies https://github.com/prettier/eslint-plugin-prettier#installation
There was a problem hiding this comment.
@germanurrus prettier and the eslint config have to be here otherwise the staging build breaks because of how monorepos work
There was a problem hiding this comment.
added deps back and left out redux
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| refetchOnWindowFocus: process.env.NODE_ENV !== 'development', |
There was a problem hiding this comment.
the default for this configuration is true seems to me too hard and resource consuming to use it on dev mode reloading every we switch seems: visual studio code <=> browser.
On prod or staging it's on with this code. Looks like a nice feature to keep the page updated, any suggestions?
There was a problem hiding this comment.
I think we can keep the refetch on development as well. Our local machines are more powerful than staging/prod and unless new data is returned then no additional page renders occur.
| "redux": "^4.1.0", | ||
| "redux-persist": "^6.0.0", | ||
| "redux-persist-cookie-storage": "^1.0.0", | ||
| "redux-thunk": "^2.3.0", | ||
| "sass": "^1.49.8", | ||
| "string-strip-html": "8.3.0", | ||
| "prettier": "^2.7.1", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-prettier": "^4.0.0" |
There was a problem hiding this comment.
@germanurrus prettier and the eslint config have to be here otherwise the staging build breaks because of how monorepos work
| data: | ||
| data?.pages?.reduce((prev, current) => [...prev, ...current.data], []) ?? | ||
| [], |
There was a problem hiding this comment.
it's possible for the API to return null on communities-for-homepage endpoint. To prevent errors maybe we should do something like:
data: data?.pages?.reduce((prev, current) => {
return current.data ? [...prev, ...current.data] : prev;
}, []),
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| refetchOnWindowFocus: process.env.NODE_ENV !== 'development', |
There was a problem hiding this comment.
I think we can keep the refetch on development as well. Our local machines are more powerful than staging/prod and unless new data is returned then no additional page renders occur.
|
@germanurrus I'm unable to create a community when I visit |
| import { QueryClient, QueryClientProvider } from 'react-query'; | ||
|
|
||
| // create react-query client | ||
| const queryClient = new QueryClient(); |
There was a problem hiding this comment.
default comes with refetchOnWindowFocus: true,
Home page updates:
react-querydependenciestodev dependenciesThere's only one issue that will be addressed in another PR: