Skip to content

Commit

Permalink
feat: open the login page through URL
Browse files Browse the repository at this point in the history
  • Loading branch information
b3aton committed Aug 17, 2022
1 parent d03279e commit 477450e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions apps/storefront/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,23 @@ export default function App() {
}
}, [isOpen])

useEffect(() => {
const {
host, pathname,
} = window.location

if (!/mybigcommerce.com$/.test(host)) {
return
}

if (/login.php/.test(pathname)) {
setOpenPage({
isOpen: true,
openUrl: '/login',
})
}
}, [])

return (
<HashRouter>
<div className="bundle-app">
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/src/components/form/B3FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const B3FileUpload = (props: FileUploadProps) => {
const {
acceptedFiles = FILE_UPLOAD_ACCEPT_TYPE,
filesLimit = 3,
maxFileSize = 10485760, // 10M
maxFileSize = 2097152, // 2M
dropzoneText = b3Lang('intl.global.fileUpload.defaultText'),
previewText = ' ',
fieldType,
Expand Down
4 changes: 2 additions & 2 deletions apps/storefront/src/pages/registered/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export const conversionItemFormat = (FormFields: AccountFormFieldsList) => {
}
if (obj.fieldType === 'files') {
obj.filesLimit = 3
obj.maxFileSize = 2097152
obj.maxFileSize = 10485760
obj.default = []
}

Expand Down Expand Up @@ -364,7 +364,7 @@ export const companyAttachmentsFields = (b3lang: B3Lang) : ContactInformationIte
required: false,
xs: 12,
filesLimit: 3,
maxFileSize: 2097152, // 2M
maxFileSize: 10485760, // 10M
},
]
export interface Country {
Expand Down

0 comments on commit 477450e

Please sign in to comment.