1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-16 03:26:19 +02:00

fix assets pro btn

This commit is contained in:
Kushagra Gour
2024-04-15 13:03:29 +05:30
parent f27894a0f5
commit f14f366b17
3 changed files with 9 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import { LoaderWithText } from './Loader';
import { Text } from './Text'; import { Text } from './Text';
import { Icon } from './Icons'; import { Icon } from './Icons';
const Assets = () => { const Assets = ({ onProBtnClick }) => {
const [files, setFiles] = useState([]); const [files, setFiles] = useState([]);
const [isFetchingFiles, setIsFetchingFiles] = useState(false); const [isFetchingFiles, setIsFetchingFiles] = useState(false);
const [searchTerm, setSearchTerm] = useState(''); const [searchTerm, setSearchTerm] = useState('');
@ -161,7 +161,7 @@ const Assets = () => {
return ( return (
<VStack align="stretch" gap={2}> <VStack align="stretch" gap={2}>
<p>Assets feature is available in PRO plan.</p> <p>Assets feature is available in PRO plan.</p>
<button class="btn btn--primary "> <button class="btn btn--primary" onClick={onProBtnClick}>
<HStack gap={1} fullWidth justify="center"> <HStack gap={1} fullWidth justify="center">
Upgrade to <ProBadge /> Upgrade to <ProBadge />
</HStack> </HStack>

View File

@ -68,7 +68,7 @@ export function Pro({ user }) {
style="gap:0.2rem" style="gap:0.2rem"
href={`https://web-maker.lemonsqueezy.com/checkout/buy/${ href={`https://web-maker.lemonsqueezy.com/checkout/buy/${
checkoutIds[isAnnual ? 'annual' : 'monthly'] checkoutIds[isAnnual ? 'annual' : 'monthly']
}?embed=1&checkout[custom][userId]=${user.uid}`} }?embed=1&checkout[custom][userId]=${user?.uid}`}
> >
Go <ProBadge /> Go <ProBadge />
</A> </A>

View File

@ -1776,7 +1776,12 @@ export default class App extends Component {
show={this.state.isAssetsOpen} show={this.state.isAssetsOpen}
closeHandler={() => this.setState({ isAssetsOpen: false })} closeHandler={() => this.setState({ isAssetsOpen: false })}
> >
<Assets /> <Assets
onProBtnClick={() => {
this.proBtnClickHandler();
this.setState({ isAssetsOpen: false });
}}
/>
</Modal> </Modal>
<Modal <Modal
show={this.state.isNotificationsModalOpen} show={this.state.isNotificationsModalOpen}