Skip to content
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

added Twitter to connect #490

Closed
wants to merge 1 commit into from

Conversation

Indrajeety993648
Copy link
Contributor

Add Twitter Support to Footer

Issue Fixes : #480

Description

This pull request introduces support for displaying a Twitter link in the footer component of the application. The following changes have been made:

  • Updated Footer.tsx Component:

    • Added Twitter icon and link to the Connect section.
    • Conditionally rendered the Twitter icon based on the presence of NEXT_PUBLIC_TWITTER_URL in the environment variables.
  • Updated Environment Configuration (env.mjs):

    • Added NEXT_PUBLIC_TWITTER_URL to handle the optional Twitter URL.
  • Fixed Formatting and Style Issues:

    • Corrected import formatting to comply with Prettier rules.
    • Replaced arbitrary Tailwind CSS values with predefined classes for consistency.

Changes

Footer.tsx

  • Added Twitter support to the Connect section.
  • Adjusted import statements for improved readability.

env.mjs

  • Included NEXT_PUBLIC_TWITTER_URL in the environment configuration.

Checklist

  • Code adheres to the project's style guidelines.
  • All new and existing tests pass.
  • Changes tested locally.

Testing Instructions

  1. Ensure that your .env file includes the NEXT_PUBLIC_TWITTER_URL variable.
  2. Start the development server and verify that the Twitter icon appears in the footer if the URL is provided.
  3. Confirm that other social media icons are correctly displayed based on their respective environment variables.

Copy link

vercel bot commented Aug 10, 2024

@Indrajeety993648 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

@Indrajeety993648
Copy link
Contributor Author

@rithviknishad please review

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

Could you discard all changes that are unrelated to the issue?

Feel free to create separate issues for each of the extra things solved.

@Indrajeety993648
Copy link
Contributor Author

Indrajeety993648 commented Aug 10, 2024

@rithviknishad One prettier related problem that is necessary to solve during commit that I changed . Rest are related to Issue , Please review and merge this PR

Copy link

vercel bot commented Aug 10, 2024

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

Name Status Preview Comments Updated (UTC)
leaderboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 10, 2024 3:10pm

@Indrajeety993648
Copy link
Contributor Author

@rithviknishad please review .

Copy link
Member

Choose a reason for hiding this comment

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

Could you discard changes to the lockfile?

NEXT_PUBLIC_GITHUB_URL: process.env.NEXT_PUBLIC_GITHUB_URL,
NEXT_PUBLIC_LINKEDIN_URL: process.env.NEXT_PUBLIC_LINKEDIN_URL,
NEXT_PUBLIC_YOUTUBE_URL: process.env.NEXT_PUBLIC_YOUTUBE_URL,
NEXT_PUBLIC_TWITTER_URL: process.env.NEXT_PUBLIC_TWITTER_URL, // Add this line
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
NEXT_PUBLIC_TWITTER_URL: process.env.NEXT_PUBLIC_TWITTER_URL, // Add this line
NEXT_PUBLIC_TWITTER_URL: process.env.NEXT_PUBLIC_TWITTER_URL,

@@ -17,6 +17,7 @@ export const env = createEnv({
NEXT_PUBLIC_GITHUB_URL: z.string(),
NEXT_PUBLIC_LINKEDIN_URL: z.string(),
NEXT_PUBLIC_YOUTUBE_URL: z.string(),
NEXT_PUBLIC_TWITTER_URL: z.string().optional(), // Add this line
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
NEXT_PUBLIC_TWITTER_URL: z.string().optional(), // Add this line
NEXT_PUBLIC_TWITTER_URL: z.string().optional(),

{env.NEXT_PUBLIC_TWITTER_URL && (
<SocialLink
href={env.NEXT_PUBLIC_TWITTER_URL}
icon={FaTwitter}
Copy link
Member

Choose a reason for hiding this comment

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

You should be using the Twitter's X logo instead

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Twitter to Connect
2 participants