-
-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NextJS Migration WIP * wip * Convert API module to a service * wip * Get mentors and Links working * another round * nextjs 7 deprecated the use of process.browser :lolsob: * use proper link imports * typscript fixes * allow implicit any * Factor out mentor filtering (#883) * fix tawk ssr + ignore lint (for now) (#884) * fix(login): require refresh after login (#885) * Fix TS Build Errors (#880) * fix build * Force authentication for "me" routes (#887) * Update README (#881) * fix: css vars not working (#889) * Remove react-router completely (#886) * Remove react-router completely * Update src/Me/Me.tsx Co-authored-by: Mosh Feu <[email protected]> * remove comment * A bit more polish on the auth redirect flow Co-authored-by: Mosh Feu <[email protected]> * fix: icons, body style and GA (#891) * fix: mentor avatar click (#888) * fix: mentors loader & /me menu styles (#892) * fix: double redirection to auth0 (#894) * ci: stop pr previews (#893) * Persist Filters on Navigation (#896) * Use new routes for Me menu links (#897) * Use new routes for Me menu links * add root url * Use custom 404 page (#898) * Prevent User Not Found toast on user profile page load (#903) * Enforce code styles in ci (#904) * get prettier working * add golden script * use correct golden command * use prebuild hook * Remove react-helmet in favor of next/head (#908) * Remove react-helmet in favor of next/head * Fix typo * Next.js :: Add Vercel sponsorship banner (#907) * pushing to the correct * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Mosh Feu <[email protected]> * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> * imported svg * fixed bugs and repositioned the svg icon * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> * Update src/components/MobileNavigation/MobileNavigation.js Co-authored-by: Brent Clark <[email protected]> * Update src/components/Sidebar/Sidebar.tsx Co-authored-by: Brent Clark <[email protected]> Co-authored-by: Murial Anindo <[email protected]> Co-authored-by: Brent Clark <[email protected]> Co-authored-by: Mosh Feu <[email protected]> * feat: make user profile ssr (#909) * fix: svgs and styles (#910) fix svg files from cra format as image to a component. Also fixed some styles around them and modals * vercel banner * vercel banner placement * disable tests for launch * ignore a few places * fix: mentors cache (#913) Co-authored-by: Brent Clark <[email protected]> Co-authored-by: Mosh Feu <[email protected]> Co-authored-by: Steve <[email protected]> Co-authored-by: Murial <[email protected]> Co-authored-by: Murial Anindo <[email protected]>
- Loading branch information
1 parent
79ed424
commit 895d60f
Showing
103 changed files
with
4,836 additions
and
6,942 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"plugins": [ | ||
"babel-plugin-macros", | ||
["babel-plugin-styled-components", { "ssr": true, "displayName": true, "preprocess": false }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
REACT_APP_API_ENDPOINT=https://api.codingcoach.io | ||
REACT_APP_AUTH_DOMAIN=codingcoach.eu.auth0.com | ||
REACT_APP_AUTH_CLIENT_ID=IxICRc28Q2waSi00bUBp294pAt0RmcRa | ||
REACT_APP_AUTH_CALLBACK=https://mentors.codingcoach.io | ||
REACT_APP_EXPERIMENTS=newBackoffice | ||
NEXT_PUBLIC_API_ENDPOINT=https://api.codingcoach.io | ||
NEXT_PUBLIC_AUTH_DOMAIN=codingcoach.eu.auth0.com | ||
NEXT_PUBLIC_AUTH_CLIENT_ID=IxICRc28Q2waSi00bUBp294pAt0RmcRa | ||
NEXT_PUBLIC_AUTH_CALLBACK=https://mentors.codingcoach.io | ||
NEXT_PUBLIC_EXPERIMENTS=newBackoffice | ||
NEXT_PUBLIC_PUBLIC_URL=https://mentors.codingcoach.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
REACT_APP_API_ENDPOINT=https://api-staging.codingcoach.io | ||
REACT_APP_AUTH_DOMAIN=codingcoach.eu.auth0.com | ||
REACT_APP_AUTH_CLIENT_ID=v6QIkx65SRzIUN91JuTRQ0nC4t1veOLQ | ||
REACT_APP_AUTH_CALLBACK=http://localhost:3000 | ||
REACT_APP_MAINTENANCE_MESSAGE="" | ||
NEXT_PUBLIC_API_ENDPOINT=https://api-staging.codingcoach.io | ||
NEXT_PUBLIC_AUTH_DOMAIN=codingcoach.eu.auth0.com | ||
NEXT_PUBLIC_AUTH_CLIENT_ID=v6QIkx65SRzIUN91JuTRQ0nC4t1veOLQ | ||
NEXT_PUBLIC_AUTH_CALLBACK=http://localhost:3000 | ||
NEXT_PUBLIC_MAINTENANCE_MESSAGE="" | ||
NEXT_PUBLIC_PUBLIC_URL=http://localhost:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,7 @@ cypress/screenshots | |
.eslintcache | ||
|
||
#debug | ||
debug.log | ||
debug.log | ||
|
||
# Next.js | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.next | ||
build | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,7 @@ describe('login', () => { | |
fixture: 'favorites/get', | ||
}); | ||
cy.visit('/'); | ||
cy.getByTestId('user-avatar') | ||
.getByAltText('[email protected]') | ||
.click(); | ||
cy.getByTestId('user-avatar').getByAltText('[email protected]').click(); | ||
cy.getByText('Logout').should('have.length', 1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* @type {import('next').NextConfig} | ||
*/ | ||
const nextConfig = { | ||
typescript: { | ||
// !! WARN !! | ||
// Dangerously allow production builds to successfully complete even if | ||
// your project has type errors. | ||
// !! WARN !! | ||
ignoreBuildErrors: true, | ||
tsconfigPath: './tsconfig.json', | ||
}, | ||
eslint: { | ||
// Warning: This allows production builds to successfully complete even if | ||
// your project has ESLint errors. | ||
ignoreDuringBuilds: true, | ||
}, | ||
webpack5: true, | ||
webpack: (config) => { | ||
config.resolve.fallback = { | ||
fs: false, | ||
path: false, | ||
os: false, | ||
module: false, | ||
}; | ||
|
||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: [ | ||
{ | ||
loader: '@svgr/webpack', | ||
options: { | ||
svgo: false, | ||
}, | ||
}, | ||
], | ||
}); | ||
|
||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import PageNotFound from '../src/PageNotFound'; | ||
|
||
function FourOhFour() { | ||
return ( | ||
<PageNotFound /> | ||
) | ||
} | ||
|
||
export default FourOhFour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Global CSS imports | ||
import '../src/components/layouts/App/App.css'; | ||
import 'react-toastify/dist/ReactToastify.css'; | ||
import 'react-tippy/dist/tippy.css'; | ||
import '../src/components/MemberArea/EditProfile.css'; | ||
import '../src/components/AutoComplete/AutoComplete.css'; | ||
import '../src/components/Content/Content.css'; | ||
import '../src/components/Filter/Filter.css'; | ||
import '../src/components/FilterClear/FilterClear.css'; | ||
import '../src/components/Input/Input.css'; | ||
import '../src/components/MentorsList/MentorList.css'; | ||
import '../src/components/Modal/Modal.css'; | ||
import '../src/components/SocialLinks/SocialLinks.css'; | ||
import '../src/index.css'; | ||
|
||
// import App from 'next/app' | ||
|
||
import Head from './head'; | ||
import { ApiProvider } from '../src/context/apiContext/ApiContext'; | ||
import { AuthProvider } from '../src/context/authContext/AuthContext'; | ||
import { UserProvider } from '../src/context/userContext/UserContext'; | ||
import { FiltersProvider } from '../src/context/filtersContext/FiltersContext'; | ||
import { ModalHookProvider } from '../src/context/modalContext/ModalContext'; | ||
import { MentorsProvider } from '../src/context/mentorsContext/MentorsContext'; | ||
|
||
function MyApp({ Component, pageProps }) { | ||
return ( | ||
<> | ||
<Head /> | ||
<AuthProvider> | ||
<ApiProvider> | ||
<UserProvider> | ||
<ModalHookProvider> | ||
<FiltersProvider> | ||
<MentorsProvider> | ||
<Component {...pageProps} /> | ||
</MentorsProvider> | ||
</FiltersProvider> | ||
</ModalHookProvider> | ||
</UserProvider> | ||
</ApiProvider> | ||
</AuthProvider> | ||
</> | ||
); | ||
} | ||
|
||
// Only uncomment this method if you have blocking data requirements for | ||
// every single page in your application. This disables the ability to | ||
// perform automatic static optimization, causing every page in your app to | ||
// be server-side rendered. | ||
// | ||
// MyApp.getInitialProps = async (appContext) => { | ||
// // calls page's `getInitialProps` and fills `appProps.pageProps` | ||
// const appProps = await App.getInitialProps(appContext); | ||
// | ||
// return { ...appProps } | ||
// } | ||
|
||
export default MyApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Document from 'next/document' | ||
import { ServerStyleSheet } from 'styled-components' | ||
|
||
export default class MyDocument extends Document { | ||
static async getInitialProps(ctx) { | ||
const sheet = new ServerStyleSheet() | ||
const originalRenderPage = ctx.renderPage | ||
|
||
try { | ||
ctx.renderPage = () => | ||
originalRenderPage({ | ||
enhanceApp: (App) => (props) => | ||
sheet.collectStyles(<App {...props} />), | ||
}) | ||
|
||
const initialProps = await Document.getInitialProps(ctx) | ||
return { | ||
...initialProps, | ||
styles: ( | ||
<> | ||
{initialProps.styles} | ||
{sheet.getStyleElement()} | ||
</> | ||
), | ||
} | ||
} finally { | ||
sheet.seal() | ||
} | ||
} | ||
} |
Oops, something went wrong.
895d60f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deployment failed with the following error: