fix: remove unnecessary container clearing and adjust overlay background opacity
This commit is contained in:
@@ -63,9 +63,6 @@ export default function XEmbeddedPost({
|
|||||||
function embedTweet() {
|
function embedTweet() {
|
||||||
if (!containerRef.current || !window.twttr || !tweetId) return
|
if (!containerRef.current || !window.twttr || !tweetId) return
|
||||||
|
|
||||||
// Clear container
|
|
||||||
containerRef.current.innerHTML = ''
|
|
||||||
|
|
||||||
window.twttr.widgets
|
window.twttr.widgets
|
||||||
.createTweet(tweetId, containerRef.current, {
|
.createTweet(tweetId, containerRef.current, {
|
||||||
theme: theme === 'light' ? 'light' : 'dark',
|
theme: theme === 'light' ? 'light' : 'dark',
|
||||||
@@ -127,7 +124,7 @@ export default function XEmbeddedPost({
|
|||||||
{loaded && embedded && (
|
{loaded && embedded && (
|
||||||
/* Hover overlay mask */
|
/* Hover overlay mask */
|
||||||
<div
|
<div
|
||||||
className="absolute inset-0 bg-muted/30 backdrop-blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center cursor-pointer rounded-xl"
|
className="absolute inset-0 bg-muted/40 backdrop-blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center cursor-pointer rounded-xl"
|
||||||
onClick={handleViewComments}
|
onClick={handleViewComments}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col items-center gap-3">
|
<div className="flex flex-col items-center gap-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user