Skip to content

Commit

Permalink
Allow to browse marketing boosts from analytics screen
Browse files Browse the repository at this point in the history
Also fix a warning

Don't show in changelog
  • Loading branch information
4ian committed Dec 17, 2024
1 parent 63584d1 commit c9e5272
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import ObjectGroupsListWithObjectGroupEditor from '../../ObjectGroupsList/Object
import { Tabs } from '../../UI/Tabs';
import { EventsFunctionParametersEditor } from './EventsFunctionParametersEditor';
import { EventsFunctionPropertiesEditor } from './EventsFunctionPropertiesEditor';
import ScrollView from '../../UI/ScrollView';
import { Column, Line } from '../../UI/Grid';
import { type GroupWithContext } from '../../ObjectsList/EnumerateObjects';
import { type UnsavedChanges } from '../../MainFrame/UnsavedChangesContext';
Expand Down
6 changes: 3 additions & 3 deletions newIDE/app/src/GameDashboard/GameRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ export const GameRegistration = ({
</Text>
<Text noMargin>
<Trans>
Get ready-made packs to make your game visible to the GDevelop
community.
Make your game visible to the GDevelop community and to the
world with Marketing Boosts.
</Trans>
</Text>
<Line>
<RightLoader isLoading={!game}>
<RaisedButton
label={<Trans>See marketing packs</Trans>}
label={<Trans>See Marketing Boosts</Trans>}
primary
onClick={() => setMarketingPlansDialogOpen(true)}
disabled={!game}
Expand Down
20 changes: 18 additions & 2 deletions newIDE/app/src/MarketingPlans/MarketingPlanSingleDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
getRequirementsErrors,
isMarketingPlanActive,
} from './MarketingPlanUtils';
import MarketingPlansDialog from './MarketingPlansDialog';
import Link from '../UI/Link';

const styles = {
container: {
Expand All @@ -40,6 +42,10 @@ const MarketingPlanSingleDisplay = ({
}: Props) => {
const gdevelopTheme = React.useContext(GDevelopThemeContext);

const [
marketingPlansDialogOpen,
setMarketingPlansDialogOpen,
] = React.useState<boolean>(false);
const activeGameFeaturings: ?(GameFeaturing[]) = React.useMemo(
() => {
if (!gameFeaturings) return null;
Expand Down Expand Up @@ -90,11 +96,21 @@ const MarketingPlanSingleDisplay = ({
</Paper>
<Text size="body-small" color="inherit">
<Trans>
Get ready-made packs to make your game visible to the GDevelop
community.
Make your game visible to the GDevelop community and to the world
with{' '}
<Link onClick={() => setMarketingPlansDialogOpen(true)} href="#">
<Trans>Marketing Boosts</Trans>
</Link>
.
</Trans>
</Text>
</Column>
{marketingPlansDialogOpen && game && (
<MarketingPlansDialog
game={game}
onClose={() => setMarketingPlansDialogOpen(false)}
/>
)}
</div>
);
};
Expand Down
4 changes: 2 additions & 2 deletions newIDE/app/src/MarketingPlans/MarketingPlans.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ const MarketingPlans = ({ game }: Props) => {
<ColumnStackLayout noMargin>
<Text color="secondary" noMargin>
<Trans>
Get ready-made packs to make your game visible to the GDevelop
community.{' '}
Make your game visible to the GDevelop community and to the
world with Marketing Boosts.{' '}
<Link
href="https://wiki.gdevelop.io/gdevelop5/interface/games-dashboard/marketing"
onClick={() =>
Expand Down

0 comments on commit c9e5272

Please sign in to comment.