chore: remove Granite/Toss config and entry files
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
overrides: [
|
||||
{
|
||||
// react-native 0.84+ uses TypeScript 'as' syntax in .js files
|
||||
// which the default preset doesn't handle for non-.ts files
|
||||
test: /node_modules\/react-native\/.*\.js$/,
|
||||
plugins: [['@babel/plugin-transform-typescript', { allowDeclareFields: true }]],
|
||||
},
|
||||
],
|
||||
};
|
||||
15
global.d.ts
vendored
15
global.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
interface RequireContext {
|
||||
keys(): string[];
|
||||
(id: string): any;
|
||||
<T>(id: string): T;
|
||||
resolve(id: string): string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
interface NodeRequire {
|
||||
context(directory: string, useSubdirectories?: boolean, regExp?: RegExp): RequireContext;
|
||||
}
|
||||
|
||||
interface Require {
|
||||
context(directory: string, useSubdirectories?: boolean, regExp?: RegExp): RequireContext;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import { appsInToss } from '@apps-in-toss/framework/plugins';
|
||||
import { defineConfig } from '@granite-js/react-native/config';
|
||||
|
||||
export default defineConfig({
|
||||
scheme: 'intoss',
|
||||
appName: 'archetype-firstspark',
|
||||
plugins: [
|
||||
appsInToss({
|
||||
brand: {
|
||||
displayName: '아키타입: 첫 번째 불꽃',
|
||||
primaryColor: '#FF6B35',
|
||||
icon: './app-icon.png',
|
||||
},
|
||||
permissions: [],
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -1,67 +0,0 @@
|
||||
import { css } from '@emotion/react';
|
||||
import { useEffect } from 'react';
|
||||
import { BottomTabBar } from '../src/components/BottomTabBar';
|
||||
import { OfflineRewardModal } from '../src/components/OfflineRewardModal';
|
||||
import { AchievementToast } from '../src/components/AchievementToast';
|
||||
import { ElementsScreen } from '../src/components/screens/ElementsScreen';
|
||||
import { EvolutionScreen } from '../src/components/screens/EvolutionScreen';
|
||||
import { FusionScreen } from '../src/components/screens/FusionScreen';
|
||||
import { ShopScreen } from '../src/components/screens/ShopScreen';
|
||||
import { AchievementsScreen } from '../src/components/screens/AchievementsScreen';
|
||||
import { SettingsScreen } from '../src/components/screens/SettingsScreen';
|
||||
import { useIdleTick } from '../src/hooks/useIdleTick';
|
||||
import { useGameStore } from '../src/store/useGameStore';
|
||||
import { trackGameEvent } from '../src/analytics';
|
||||
|
||||
const rootStyle = css`
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #f7f8fa;
|
||||
overflow: hidden;
|
||||
font-family:
|
||||
'Pretendard',
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
sans-serif;
|
||||
`;
|
||||
|
||||
const contentStyle = css`
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 72px;
|
||||
`;
|
||||
|
||||
export default function IndexPage() {
|
||||
const { activeTab, setActiveTab, elements, gold, elementLevels } = useGameStore();
|
||||
useIdleTick();
|
||||
|
||||
useEffect(() => {
|
||||
const ownedCount = Object.values(elements).filter((c) => c > 0).length;
|
||||
const totalLevel = Object.values(elementLevels).reduce((sum, lv) => sum + lv, 0);
|
||||
trackGameEvent('app_open', {
|
||||
platform: 'web',
|
||||
platform_time: new Date().toISOString(),
|
||||
owned_element_count: ownedCount,
|
||||
gold,
|
||||
total_enhance_level: totalLevel,
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div css={rootStyle}>
|
||||
<OfflineRewardModal />
|
||||
<AchievementToast />
|
||||
<div css={contentStyle}>
|
||||
{activeTab === 'elements' && <ElementsScreen />}
|
||||
{activeTab === 'evolution' && <EvolutionScreen />}
|
||||
{activeTab === 'fusion' && <FusionScreen />}
|
||||
{activeTab === 'shop' && <ShopScreen />}
|
||||
{activeTab === 'achievements' && <AchievementsScreen />}
|
||||
{activeTab === 'settings' && <SettingsScreen />}
|
||||
</div>
|
||||
<BottomTabBar activeTab={activeTab} onTabChange={setActiveTab} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
interface GraniteRequireContext {
|
||||
keys(): string[];
|
||||
(id: string): any;
|
||||
<T>(id: string): T;
|
||||
resolve(id: string): string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export const context = require.context('./pages', false, /\.(tsx|ts)$/) as unknown as GraniteRequireContext;
|
||||
20
src/_app.tsx
20
src/_app.tsx
@@ -1,20 +0,0 @@
|
||||
import { AppsInToss } from '@apps-in-toss/framework';
|
||||
import { TDSMobileAITProvider } from '@toss/tds-mobile-ait';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { InitialProps } from '@granite-js/react-native';
|
||||
import { context } from '../require.context';
|
||||
import { initAnalytics } from './analytics';
|
||||
import { TutorialOverlay } from './components/tutorial/TutorialOverlay';
|
||||
|
||||
initAnalytics(process.env.NODE_ENV !== 'production');
|
||||
|
||||
function AppContainer({ children }: PropsWithChildren<InitialProps>) {
|
||||
return (
|
||||
<TDSMobileAITProvider brandPrimaryColor="#FF6B35">
|
||||
{children}
|
||||
<TutorialOverlay />
|
||||
</TDSMobileAITProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default AppsInToss.registerApp(AppContainer, { context });
|
||||
Reference in New Issue
Block a user