New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port Footer to NextJS #1526
Port Footer to NextJS #1526
Conversation
@@ -0,0 +1,207 @@ | |||
import React from 'react'; |
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.
With next.js you don't need to import React
So 9a73f4f contains just the footer code. As that component is a standalone component compared to the AboutFooter and Banner component, I'd like to consider maybe having the other two in it's own PR just so we can have all standalone components merged. Leave your thoughts |
@@ -1,4 +1,5 @@ | |||
import Head from 'next/head'; | |||
import Footer from '../components/Footer/index'; |
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.
Change this to import Footer from '../components/Footer';
and the styling should be applied properly
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.
Fixed, thanks!
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.
It looks like this is now just about the Footer. If that's true, can we update the title of this?
netlify.toml
Outdated
|
||
|
||
[build.environment] | ||
API_URL="https://dev.telescope.cdot.systems" |
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.
Why is this change in your PR?
@@ -0,0 +1,3 @@ | |||
import Footer from './Footer'; |
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.
This is a .ts
not a .tsx
file.
src/frontend/next/package.json
Outdated
@@ -4,7 +4,7 @@ | |||
"private": true, | |||
"scripts": { | |||
"dev": "next dev -p 8000", | |||
"build": "next build", | |||
"build": "next build && next export", |
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.
Do we need to modify the build command for the frontend? I think this might break something, or at least delay deployment times due to the export. Let me know!
It looks like Netlify is unhappy:
|
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.
We should sort out what is up with Netlify, but the Footer itself looks good.
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.
Nice!
Issue This PR Addresses
Fixes #1454
Type of Change
Description
This PR is a part of the transition for the telescope frontend from gatsby, to next. As part of this transition, this PR addresses the porting of the Footer component to NextJS.
Expected Output:
Checklist