1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-28 17:20:13 +02:00

fix asset and new creation modal

This commit is contained in:
Kushagra Gour
2024-02-29 19:02:07 +05:30
parent ad9b45a271
commit db303072e4
3 changed files with 30 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ const Assets = () => {
const [uploadProgress, setUploadProgress] = useState();
const [listType, setListType] = useState('grid');
const storageRef = firebase.storage().ref(`assets/${window.user.uid}`);
const storageRef = firebase.storage().ref(`assets/${window.user?.uid}`);
const uploadFile = file => {
if (file.size > 5 * 1024 * 1024) {
@@ -137,6 +137,18 @@ const Assets = () => {
});
};
if (!window.user?.isPro) {
return (
<VStack align="stretch" gap={2}>
<p>Assets feature is available in PRO plan.</p>
<button class="btn btn--primary ">
<HStack gap={1} fullWidth justify="center">
Upgrade to <ProBadge />
</HStack>
</button>
</VStack>
);
}
return (
<div
onDragEnter={handleDragDropEvent}

View File

@@ -150,11 +150,10 @@ export class CreateNewModal extends Component {
<h1 class="mt-0">Create New</h1>
<Tabs horizontal onChange={this.modeChangeHandler}>
<TabPanel label={option1}>
<div class="d-f fxw-w">
<div class="templates-container">
<button
type="button"
class="btn btn--primary"
style="margin:20px 10px"
onClick={() => {
trackEvent('ui', 'startBlankBtnClick');
onBlankTemplateSelect();
@@ -176,11 +175,10 @@ export class CreateNewModal extends Component {
</div>
</TabPanel>
<TabPanel label={option2}>
<div class="d-f fxw-w show-when-app">
<div class="templates-container show-when-app">
<button
type="button"
class="btn btn--primary"
style="margin:20px 10px"
onClick={() => {
trackEvent('ui', 'startBlankFileBtnClick');
onBlankFileTemplateSelect();