mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
2 Commits
ai-ux-impr
...
fix-loader
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c6b7b90694 | ||
![]() |
a1ae2c08fb |
@@ -23,6 +23,7 @@ const useGamesList = (): GamesList => {
|
||||
authenticated,
|
||||
firebaseUser,
|
||||
getAuthorizationHeader,
|
||||
loginState,
|
||||
} = authenticatedUser;
|
||||
|
||||
const [games, setGames] = React.useState<?Array<Game>>(null);
|
||||
@@ -32,6 +33,8 @@ const useGamesList = (): GamesList => {
|
||||
|
||||
const fetchGames = React.useCallback(
|
||||
async (): Promise<void> => {
|
||||
if (loginState !== 'done') return;
|
||||
|
||||
if (!authenticated || !firebaseUser) {
|
||||
setGames([]);
|
||||
return;
|
||||
@@ -53,7 +56,7 @@ const useGamesList = (): GamesList => {
|
||||
gamesFetchingPromise.current = null;
|
||||
}
|
||||
},
|
||||
[authenticated, firebaseUser, getAuthorizationHeader]
|
||||
[authenticated, firebaseUser, getAuthorizationHeader, loginState]
|
||||
);
|
||||
|
||||
const onGameUpdated = React.useCallback(
|
||||
|
@@ -146,7 +146,6 @@ const CreateSection = ({
|
||||
const [initialWidgetToScrollTo, setInitialWidgetToScrollTo] = React.useState(
|
||||
null
|
||||
);
|
||||
const [showAllGameTemplates, setShowAllGameTemplates] = React.useState(false);
|
||||
const { routeArguments, removeRouteArguments } = React.useContext(
|
||||
RouterContext
|
||||
);
|
||||
@@ -445,26 +444,6 @@ const CreateSection = ({
|
||||
);
|
||||
}
|
||||
|
||||
if (showAllGameTemplates) {
|
||||
return (
|
||||
<SectionContainer
|
||||
backAction={() => setShowAllGameTemplates(false)}
|
||||
flexBody
|
||||
>
|
||||
<SectionRow expand>
|
||||
<ExampleStore
|
||||
onSelectExampleShortHeader={onSelectExampleShortHeader}
|
||||
onSelectPrivateGameTemplateListingData={
|
||||
onSelectPrivateGameTemplateListingData
|
||||
}
|
||||
i18n={i18n}
|
||||
columnsCount={getExampleItemsColumns(windowSize, isLandscape)}
|
||||
/>
|
||||
</SectionRow>
|
||||
</SectionContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
@@ -610,7 +589,7 @@ const CreateSection = ({
|
||||
<Trans>Start from a template</Trans>
|
||||
</Text>
|
||||
<FlatButton
|
||||
onClick={() => setShowAllGameTemplates(true)}
|
||||
onClick={onOpenNewProjectSetupDialog}
|
||||
label={
|
||||
isMobile ? (
|
||||
<Trans>Browse</Trans>
|
||||
|
Reference in New Issue
Block a user