Skip to content

Conversation

@annavik
Copy link
Member

@annavik annavik commented Mar 12, 2025

Summary

In this PR we include our new page "Code of conduct" in Antenna. The page is setup in a similar way as the page "Terms of service". We use same style and structure.

The content for this new page can be edited from a markdown file, see ui/src/components/info-page/code-of-conduct-page/code-of-conduct.md.

Since I modified our routing a bit as part of this PR, I also included a simple 404 page in this PR. We were missing that! For now, we use it if the current route can't be matched to a page.

Screenshots

Screenshot 2025-03-12 at 09 50 15 Screenshot 2025-03-12 at 10 27 43

@netlify
Copy link

netlify bot commented Mar 12, 2025

Deploy Preview for antenna-preview ready!

Name Link
🔨 Latest commit 834dd8f
🔍 Latest deploy log https://app.netlify.com/sites/antenna-preview/deploys/67d157344ac48500084306ed
😎 Deploy Preview https://deploy-preview-772--antenna-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72
Accessibility: 89
Best Practices: 92
SEO: 100
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

</div>
)
}
export const TermsOfServicePage = () => (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted code from this component to the shared component InfoPage

<Route path="collections/:id" element={<CollectionDetails />} />
<Route path="*" element={<UnderConstruction />} />
</Route>
<Route path="/:slug" element={<InfoPageContainer />} />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will no longer try to render an info page for generic slugs. This is a left over from when the backend returned dynamic content here.

Now we require exact matches!

@annavik annavik requested review from Annie-Shan and mihow March 12, 2025 09:28
@annavik annavik self-assigned this Mar 12, 2025
@annavik annavik changed the title Setup page "Code of conduct" Add page "Code of conduct" to UI Mar 12, 2025
Copy link
Collaborator

@mihow mihow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome this is a milestone! Perhaps there will be a reason to bring back dynamic pages in the future, but the addition of the 404 page and the fast response for bad paths is much better!

@mihow mihow merged commit 071b0a7 into main Mar 13, 2025
6 checks passed
@mihow mihow deleted the feat/add-code-of-conduct branch March 13, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants