diff --git a/apps/studio/src/pages/createProfile/CreateProfile.tsx b/apps/studio/src/pages/createProfile/CreateProfile.tsx index cad7b9674..adbdc5d8e 100644 --- a/apps/studio/src/pages/createProfile/CreateProfile.tsx +++ b/apps/studio/src/pages/createProfile/CreateProfile.tsx @@ -1,9 +1,15 @@ import { FunctionComponent, useMemo } from "react"; +import { useLocation } from "react-router-dom"; + +import { useFlags } from "launchdarkly-react-client-sdk"; + +import * as Yup from "yup"; + import { Box, Container, useTheme } from "@mui/material"; + import { WizardForm } from "@newm-web/elements"; -import * as Yup from "yup"; import { getUpdatedValues, removeTrailingSlash } from "@newm-web/utils"; -import { useLocation } from "react-router-dom"; + import Begin from "./Begin"; import SelectNickname from "./SelectNickname"; import SelectRole from "./SelectRole"; @@ -13,7 +19,7 @@ import AddLastName from "./AddLastName"; import SelectLocation from "./SelectLocation"; import NotFoundPage from "../NotFoundPage"; import { useGetRolesQuery } from "../../modules/content"; -import { commonYupValidation } from "../../common"; +import { commonYupValidation, useBreakpoint } from "../../common"; import { ProfileFormValues, emptyProfile, @@ -24,7 +30,11 @@ import { const rootPath = "create-profile"; const CreateProfile: FunctionComponent = () => { + const { webStudioDisableDistributionAndSales } = useFlags(); + const theme = useTheme(); + const { isDesktop } = useBreakpoint(); + const currentPathLocation = useLocation(); const { data: roles = [] } = useGetRolesQuery(); @@ -127,6 +137,7 @@ const CreateProfile: FunctionComponent = () => { display: "flex", flex: 1, maxWidth: "100%", + mt: webStudioDisableDistributionAndSales && isDesktop ? 4 : 0, pt: 7.5, px: 2, textAlign: "center", diff --git a/apps/studio/src/pages/home/Home.tsx b/apps/studio/src/pages/home/Home.tsx index 580cc8826..54152fd1b 100644 --- a/apps/studio/src/pages/home/Home.tsx +++ b/apps/studio/src/pages/home/Home.tsx @@ -143,7 +143,16 @@ const Home: FunctionComponent = () => { path="" /> - } path="upload-song/*" /> + + ) : ( + + ) + } + path="upload-song/*" + /> { // TODO(webStudioAlbumPhaseTwo): Remove flag once flag is retired. - const { webStudioAlbumPhaseTwo } = useFlags(); + const { webStudioAlbumPhaseTwo, webStudioDisableDistributionAndSales } = + useFlags(); const [query, setQuery] = useState(""); @@ -33,23 +40,38 @@ const Discography: FunctionComponent = () => { - - }> + + + } message="Create New Release" /> + + + + ) : ( + - } message="Create New Release" /> - - + + } message="Create New Release" /> + + + ) } { totalCountOfSongs || query ? ( diff --git a/apps/studio/src/pages/home/releases/Releases.tsx b/apps/studio/src/pages/home/releases/Releases.tsx index 2df5c3699..a9143d66e 100644 --- a/apps/studio/src/pages/home/releases/Releases.tsx +++ b/apps/studio/src/pages/home/releases/Releases.tsx @@ -1,5 +1,5 @@ import { FunctionComponent } from "react"; -import { Route, Routes } from "react-router-dom"; +import { Navigate, Route, Routes } from "react-router-dom"; import { useFlags } from "launchdarkly-react-client-sdk"; @@ -16,7 +16,9 @@ import NotFoundPage from "../../NotFoundPage"; const Releases: FunctionComponent = () => { // TODO(webStudioAlbumPhaseTwo): Remove flag once flag is retired. - const { webStudioAlbumPhaseTwo } = useFlags(); + // TODO(webStudioDisableDistributionAndSales): Remove once flag is retired. + const { webStudioAlbumPhaseTwo, webStudioDisableDistributionAndSales } = + useFlags(); return ( { { webStudioAlbumPhaseTwo && ( <> - } path="new/*" /> + + ) : ( + + ) + } + path="new/*" + /> } path=":releaseId/*" /> - } path="new/track/new" /> - } path=":releaseId/track/new" /> + + ) : ( + + ) + } + path="new/track/new" + /> + + + ) : ( + + ) + } + path=":releaseId/track/new" + /> + } path=":releaseId/track/:trackId"