Skip to content

Static Site Generation#189

Merged
davidheyman merged 16 commits intomasterfrom
static
May 23, 2025
Merged

Static Site Generation#189
davidheyman merged 16 commits intomasterfrom
static

Conversation

@davidheyman
Copy link
Member

This pull request introduces several improvements and refactorings across the codebase, focusing on replacing useRouter with a new useLocale hook, enhancing translations, and improving image handling. Additionally, it includes minor code style adjustments and updates to configuration files.

Refactoring: Replace useRouter with useLocale

  • Replaced useRouter with the custom useLocale hook in various components to simplify locale handling. This change was applied in files such as AtlasController, Breadcrumbs, Footer, Head, Header, ImageController, ImageFilter, ImageGrid, ImageList, ImageSearch, and ImageSort. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Translation Enhancements

  • Added a new narratives key to the translations.js file to support additional translation strings.
  • Updated the Header component to include a new "Forum" link using the translations object.

Image Handling Improvements

  • Replaced next/image with Chakra UI's Box for rendering images in ImageGrid and ImageList components, improving flexibility and reducing dependencies. [1] [2]

Code Style Adjustments

  • Standardized import ordering across multiple files to maintain consistency and readability. [1] [2] [3] [4]

Configuration Updates

  • Added .idea/jsLinters/eslint.xml to enable ESLint auto-fix on save.
  • Removed .idea/misc.xml to clean up unused configuration.

… next.config.js to enable unoptimized images
@vercel
Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
imaginerio-next ❌ Failed (Inspect) May 23, 2025 7:25am

<Link href={`${locale}/iconography`}>
<Button variant="homepage">{translations.browseIconografy[locale]}</Button>
</Link>
<Box my={[5, 10]}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

<Box my={[5, 10]}>
<Image src="/img/image3.png" width={460} height={286} alt="imagineRio" />
</Box>
<Box my={[5, 10]}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

</Box>
<Box>
<Image src="/img/image1.png" width={460} height={460} alt="imagineRio" />
<Box my={[5, 10]}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

<Box my={[5, 10]}>
<Image src="/img/image2.png" width={460} height={320} alt="imagineRio" />
</Box>
<Box my={[5, 10]}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 4 locations. Consider refactoring.

'Api-Username': 'system',
};

const {

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

<Text my={10} as="div">
<ParsedContent content={iconography} />
</Text>
<Link href={`${locale}/iconography`}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

<Text my={10} as="div">
<ParsedContent content={map} />
</Text>
<Link href={`${locale}/map`}>

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

post_stream: { posts: map },
},
} = await axios.get(`${process.env.NEXT_PUBLIC_PAGE_URL}${pages[locale].map}.json`, { headers });
const {

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.


export default Home;

export async function getStaticPaths() {

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

collections: PropTypes.arrayOf(PropTypes.shape()).isRequired,
};

export async function getStaticPaths() {

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit f92ff50 and detected 10 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 10

View more on Code Climate.

@davidheyman davidheyman merged commit 01ff070 into master May 23, 2025
2 of 3 checks passed
@davidheyman davidheyman deleted the static branch May 23, 2025 07:26
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.

1 participant