forked from elliotBraem/efizzybot
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Landing page new #39
Merged
Merged
Landing page new #39
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
1a40b42
Refactor for landing page UI with mobile responsiveness
Jikugodwill 4b56c9e
installed lucide-react for icons
Jikugodwill 2de1cd0
updated UI and add FAQ section
Jikugodwill ccadb7e
updated UI to fx hero image and mobile vw
Jikugodwill 2e71183
Added more icons
Jikugodwill ba000b5
minor UI fix for communities
Jikugodwill c836c87
fix for more icons and key features layout
Jikugodwill de11ba7
more of UI fix
Jikugodwill 7f5563c
fix for communties
Jikugodwill 7d3b2b6
images for key features
Jikugodwill f7fbde6
installed react-tweet
Jikugodwill f5ebaf2
fmt
Jikugodwill 148bfcb
update for learn more to open in new tab
Jikugodwill b39bdb5
Added tweet
Jikugodwill bafc2d5
completed added twitter integration and major UI fixes
Jikugodwill 39471a3
Added nice animation for icons
Jikugodwill 402a43a
animated communities and updated hero image
Jikugodwill 8db2c90
approve typo
Jikugodwill b742e35
Added communities
Jikugodwill e685fff
fmt
Jikugodwill e618cf7
spacing
Jikugodwill 5bbadf4
Error handling for tweet rendering
Jikugodwill a8604f5
fixed animation
Jikugodwill 017b93f
dynamic hastags
Jikugodwill 0b9e043
added tweets + fmt
Jikugodwill 0fce1bd
update footer
Jikugodwill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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,76 @@ | ||
import React from "react"; | ||
import tweetData from "../data/tweets.json"; | ||
import { Tweet } from "react-tweet"; | ||
import { ErrorBoundary } from "next/dist/client/components/error-boundary"; | ||
|
||
const TweetWall = () => { | ||
const [currentIndex, setCurrentIndex] = React.useState(0); | ||
|
||
const handleScroll = (event) => { | ||
const scrollLeft = event.target.scrollLeft; | ||
const width = event.target.clientWidth; | ||
const newIndex = Math.round(scrollLeft / width); | ||
setCurrentIndex(newIndex); | ||
}; | ||
|
||
return ( | ||
<div data-theme="light"> | ||
<div className="hidden md:grid md:grid-cols-3"> | ||
{tweetData.tweetIds.map((tweetId, index) => ( | ||
<div | ||
key={index} | ||
className={`p-8 ${index < 6 ? "border-b" : ""} ${ | ||
index % 3 !== 2 ? "border-r" : "" | ||
} border-[#57606A] `} | ||
style={{ | ||
height: "500px", | ||
overflowY: "scroll", | ||
scrollbarWidth: "none", | ||
}} | ||
> | ||
<ErrorBoundary | ||
fallback={ | ||
<div className="p-4 text-gray-500">Failed to load tweet</div> | ||
} | ||
> | ||
<Tweet id={tweetId} /> | ||
</ErrorBoundary> | ||
</div> | ||
))} | ||
</div> | ||
<div className="md:hidden"> | ||
<div | ||
className="flex overflow-x-auto snap-x snap-mandatory scrollbar-hide" | ||
onScroll={handleScroll} | ||
> | ||
{tweetData.tweetIds.map((tweetId, index) => ( | ||
<div | ||
key={index} | ||
className="mb-4 min-w-full flex-shrink-0 snap-center mx-auto p-4 md:p-8 border-b border-[#57606A] flex justify-center" | ||
> | ||
<ErrorBoundary | ||
fallback={ | ||
<div className="p-4 text-gray-500">Failed to load tweet</div> | ||
} | ||
> | ||
<Tweet id={tweetId} className="mx-auto" /> | ||
</ErrorBoundary> | ||
</div> | ||
))} | ||
</div> | ||
<div className="flex justify-center gap-2 mt-4 mb-6"> | ||
{tweetData.tweetIds.map((_, index) => ( | ||
<div | ||
key={index} | ||
className={`h-2 w-2 rounded-full ${ | ||
index === currentIndex ? "bg-black" : "bg-gray-200" | ||
}`} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TweetWall; |
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,8 @@ | ||
{ | ||
"tweetIds": [ | ||
"1881684365459280082", | ||
"1881680249311883591", | ||
"1886638266876879340", | ||
"1886318920996409814" | ||
] | ||
} |
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 @@ | ||
/** @type {import('next').NextConfitg } */ | ||
const nextConfig = { | ||
transpilePackages: ["react-tweet"], | ||
}; | ||
|
||
export default 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Use the public API for ErrorBoundary import.
Importing from Next.js internal paths (
next/dist/client/components/error-boundary
) is not recommended as these paths may change between versions. Consider using a stable public API or implementing your own ErrorBoundary component.Apply this diff to use a custom ErrorBoundary implementation:
📝 Committable suggestion