forked from tapexyz/tape
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fef2f25
commit c40a6f9
Showing
6 changed files
with
1,619 additions
and
91 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
apps/web/src/components/Profile/BasicInfo/Follow.module.css
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,16 @@ | ||
/* apps/web/src/components/Profile/BasicInfo/Follow.module.css */ | ||
.container { | ||
display: flex; | ||
align-items: center; | ||
gap: 1rem; | ||
} | ||
|
||
.tipButton { | ||
background-color: #fca5a5; /* Adjust color for tip button */ | ||
color: #fff; | ||
padding: 0.5rem 1rem; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
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
33 changes: 33 additions & 0 deletions
33
apps/web/src/components/Watch/OpenActions/Unknown/Tip/TipEmbed.module.css
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,33 @@ | ||
/* apps/web/src/components/Watch/OpenActions/Unknown/Tip/TipEmbed.module.css */ | ||
.modal { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.5); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 1000; | ||
} | ||
|
||
.modal-content { | ||
background: white; | ||
padding: 2rem; | ||
border-radius: 8px; | ||
position: relative; | ||
width: 90%; | ||
max-width: 500px; | ||
} | ||
|
||
.modal-close { | ||
position: absolute; | ||
top: 10px; | ||
right: 10px; | ||
background: none; | ||
border: none; | ||
font-size: 1.5rem; | ||
cursor: pointer; | ||
} | ||
|
71 changes: 71 additions & 0 deletions
71
apps/web/src/components/Watch/OpenActions/Unknown/Tip/TipEmbed.tsx
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,71 @@ | ||
// apps/web/src/components/Watch/OpenActions/Unknown/Tip/TipEmbed.tsx | ||
import React, { useEffect, useState } from 'react' | ||
import { createThirdwebClient } from 'thirdweb' | ||
import { base } from 'thirdweb/chains' | ||
import { darkTheme, PayEmbed } from 'thirdweb/react' | ||
|
||
import styles from './TipEmbed.module.css' | ||
|
||
const client = createThirdwebClient({ | ||
clientId: 'ss' // Replace with your actual client ID | ||
}) | ||
|
||
interface TipEmbedProps { | ||
publicationId: string | ||
onClose: () => void | ||
} | ||
|
||
const TipEmbed: React.FC<TipEmbedProps> = ({ publicationId, onClose }) => { | ||
const [showPayEmbed, setShowPayEmbed] = useState(false) | ||
|
||
useEffect(() => { | ||
setShowPayEmbed(true) | ||
}, []) | ||
|
||
return ( | ||
<div className={styles.modal}> | ||
<div className={styles.modalContent}> | ||
<button className={styles.modalClose} onClick={onClose}> | ||
✖ | ||
</button> | ||
<h2 className="text-brand-500"> | ||
Tip for Publication ID: {publicationId} | ||
</h2> | ||
{showPayEmbed && ( | ||
<PayEmbed | ||
client={client} | ||
payOptions={{ | ||
prefillBuy: { | ||
token: { | ||
address: '0x4200000000000000000000000000000000000006', // ETH on Base | ||
name: 'ETH', | ||
symbol: 'ETH' | ||
}, | ||
chain: base, | ||
allowEdits: { | ||
amount: true, | ||
token: false, | ||
chain: false | ||
} | ||
} | ||
}} | ||
theme={darkTheme({ | ||
colors: { | ||
modalBg: '#100c1f' // Hard-coded value matching the brand[250] color | ||
} | ||
})} | ||
connectOptions={{ | ||
connectModal: { | ||
size: 'compact', | ||
title: 'Connect your wallet' | ||
}, | ||
autoConnect: { timeout: 15000 } | ||
}} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default TipEmbed |
Oops, something went wrong.