Skip to content

Commit

Permalink
[C-2700][C-2701] upload redesign feature flag and placeholder page (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amendelsohn committed Jun 1, 2023
1 parent 75d1071 commit 014987e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export enum FeatureFlags {
PLAYLIST_UPDATES_POST_QA = 'playlist_updates_post_qa',
AI_ATTRIBUTION = 'ai_attribution',
WRITE_METADATA_THROUGH_CHAIN = 'write_metadata_through_chain',
DEVELOPER_APPS_PAGE = 'developer_apps_page'
DEVELOPER_APPS_PAGE = 'developer_apps_page',
UPLOAD_REDESIGN_ENABLED = 'upload_redesign_enabled'
}

type FlagDefaults = Record<FeatureFlags, boolean>
Expand Down Expand Up @@ -114,5 +115,6 @@ export const flagDefaults: FlagDefaults = {
[FeatureFlags.PLAYLIST_UPDATES_POST_QA]: false,
[FeatureFlags.AI_ATTRIBUTION]: false,
[FeatureFlags.WRITE_METADATA_THROUGH_CHAIN]: false,
[FeatureFlags.DEVELOPER_APPS_PAGE]: false
[FeatureFlags.DEVELOPER_APPS_PAGE]: false,
[FeatureFlags.UPLOAD_REDESIGN_ENABLED]: false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { FeatureFlags } from '@audius/common'

import { useFlag } from 'hooks/useRemoteConfig'

import UploadPageLegacy from './UploadPageLegacy'
import UploadPageNew from './UploadPageNew'

export const UploadPage = (props: any) => {
const { isEnabled: isRedesignEnabled } = useFlag(
FeatureFlags.UPLOAD_REDESIGN_ENABLED
)

return isRedesignEnabled ? (
<UploadPageNew {...props} />
) : (
<UploadPageLegacy {...props} />
)
}

export default UploadPage
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Pages = Object.freeze({

const SHOW_FIRST_UPLOAD_MODAL_DELAY = 3000

const UploadPage = (props) => {
const UploadPageLegacy = (props) => {
const { children, page } = props

return (
Expand Down Expand Up @@ -451,7 +451,7 @@ class Upload extends Component {
contentClassName={styles.upload}
header={header}
>
<UploadPage page={page}>{currentPage}</UploadPage>
<UploadPageLegacy page={page}>{currentPage}</UploadPageLegacy>
</Page>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.upload {
text-align: left;
}

.header {
display: flex;
align-items: center;
justify-content: center;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { UploadType } from '@audius/common'

import Header from 'components/header/desktop/Header'
import Page from 'components/page/Page'

import styles from './UploadPage.module.css'

type UploadPageProps = {
uploadType: UploadType
}

export const UploadPageNew = (props: UploadPageProps) => {
return (
<Page
title='Upload'
description='Upload and publish audio content to the Audius platform'
contentClassName={styles.upload}
header={<Header primary={'Upload'} />}
>
This is the new upload page
</Page>
)
}

export default UploadPageNew

0 comments on commit 014987e

Please sign in to comment.