Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion coderules.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ Steps for replacing Navigation.push:
## Project Structure Notes

- Navigation types are in `src/navigation/types.ts`
- Custom icons are in the `iconsMap` from `@app/NavIcons`
- Theme colors are in `COLORS` from `@styles/colors`
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"resolutions": {
"@apollo/client": "3.11.1",
"cross-undici-fetch": "0.1.20",
"react-native-gesture-handler": "2.24.0",
"react-native-svg": "15.11.2",
"react-native-gesture-handler": "2.28.0",
"react-native-svg": "15.12.1",
"@types/react": "~19.0.10"
},
"copyFilesSettings": {
Expand All @@ -55,7 +55,7 @@
"@op-engineering/op-sqlite": "15.1.4",
"@react-hook/debounce": "4.0.0",
"@react-hook/throttle": "2.2.0",
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-async-storage/async-storage": "2.2.0",
"@react-native-clipboard/clipboard": "^1.16.3",
"@react-native-community/cli": "18.0.0",
"@react-native-community/cli-platform-android": "18.0.0",
Expand All @@ -70,6 +70,10 @@
"@react-native-firebase/database": "^23.4.1",
"@react-native-firebase/functions": "^23.4.1",
"@react-native-google-signin/google-signin": "12.2.1",
"@react-native-vector-icons/common": "^12.4.0",
"@react-native-vector-icons/icomoon": "^12.3.0",
"@react-native-vector-icons/material-design-icons": "^12.4.0",
"@react-native-vector-icons/material-icons": "^12.4.0",
"@react-navigation/bottom-tabs": "^7.4.7",
"@react-navigation/native": "^7.1.17",
"@react-navigation/native-stack": "^7.3.26",
Expand All @@ -86,30 +90,30 @@
"domhandler": "^5.0.3",
"domutils": "^3.2.2",
"events": "3.3.0",
"expo": "53.0.23",
"expo-asset": "^12.0.9",
"expo-audio": "~0.4.9",
"expo-auth-session": "~6.2.1",
"expo-build-properties": "~0.14.8",
"expo-crypto": "~14.1.5",
"expo-dev-client": "~5.2.4",
"expo-file-system": "^19.0.17",
"expo-image": "2.4.1",
"expo-keep-awake": "~14.1.4",
"expo": "54.0.29",
"expo-asset": "~12.0.11",
"expo-audio": "~1.1.0",
"expo-auth-session": "~7.0.10",
"expo-build-properties": "~1.0.10",
"expo-crypto": "~15.0.8",
"expo-dev-client": "~6.0.20",
"expo-file-system": "~19.0.21",
"expo-image": "3.0.11",
"expo-keep-awake": "~15.0.8",
"expo-key-event": "^1.4.0",
"expo-splash-screen": "~0.30.10",
"expo-splash-screen": "~31.0.12",
"flatted": "3.3.1",
"graphql": "16.8.1",
"hoist-non-react-statics": "3.3.2",
"htmlparser2": "^10.0.0",
"lodash": "4.17.21",
"lottie-react-native": "7.2.2",
"lottie-react-native": "~7.3.1",
"lucide-react-native": "^0.475.0",
"priority-queue-typescript": "1.0.1",
"query-string": "8.1.0",
"react": "19.0.0",
"react": "19.1.0",
"react-hook-thunk-reducer": "0.3.0",
"react-native": "0.79.6",
"react-native": "0.81.5",
"react-native-anchor-point": "^1.0.6",
"react-native-appstate-hook": "1.0.6",
"react-native-base64": "0.2.1",
Expand All @@ -124,14 +128,14 @@
"react-native-flip-card": "3.5.7",
"react-native-floating-action": "^1.22.0",
"react-native-fresh-refresh": "2.1.1",
"react-native-gesture-handler": "2.24.0",
"react-native-gesture-handler": "~2.28.0",
"react-native-haptic-feedback": "2.3.3",
"react-native-keychain": "10.0.0",
"react-native-localize": "3.2.0",
"react-native-markdown-display": "^7.0.2",
"react-native-markdown-view": "https://github.com/zzorba/react-native-markdown-view#1.1.23",
"react-native-modal": "14.0.0-rc.1",
"react-native-pager-view": "6.7.1",
"react-native-pager-view": "6.9.1",
"react-native-pan-pinch-view": "2.0.0",
"react-native-progress": "5.0.1",
"react-native-reanimated": "4.1.5",
Expand All @@ -144,13 +148,12 @@
"react-native-side-menu-updated": "1.3.2",
"react-native-snap-carousel": "4.0.0-beta.6",
"react-native-super-grid": "^5.0.0",
"react-native-svg": "15.11.2",
"react-native-svg": "15.12.1",
"react-native-tab-view": "4.1.3",
"react-native-table-component": "^1.2.2",
"react-native-toast-message": "^2.2.1",
"react-native-uuid": "2.0.3",
"react-native-vector-icons": "10.2.0",
"react-native-worklets": "^0.6.1",
"react-native-worklets": "0.5.1",
"react-native-zoom-view": "1.0.2",
"react-redux": "8.1.3",
"redux": "4.2.1",
Expand All @@ -163,7 +166,6 @@
"remove-accents": "^0.5.0",
"remove-diacritical-marks": "1.0.1",
"reselect": "4.1.8",
"rn-fetch-blob": "0.12.0",
"rn-placeholder": "3.0.3",
"simple-markdown": "0.7.3",
"stable": "0.1.8",
Expand Down Expand Up @@ -202,10 +204,9 @@
"@types/hoist-non-react-statics": "3.3.4",
"@types/lodash": "4.14.200",
"@types/markdown-it": "^14.1.2",
"@types/react": "~19.0.10",
"@types/react": "~19.1.10",
"@types/react-native-flip-card": "3.5.4",
"@types/react-native-keep-awake": "2.0.5",
"@types/react-native-vector-icons": "6.4.16",
"@types/react-test-renderer": "^19.0.0",
"@types/throttle-debounce": "5.0.1",
"@types/tinycolor2": "^1.4.5",
Expand All @@ -225,7 +226,7 @@
"react-native-svg-transformer": "1.5.0",
"react-test-renderer": "19.0.0",
"ttag-cli": "1.10.6",
"typescript": "~5.8.3"
"typescript": "~5.9.2"
},
"engines": {
"node": ">=18"
Expand Down
66 changes: 0 additions & 66 deletions src/application/NavIcons.ts

This file was deleted.

18 changes: 3 additions & 15 deletions src/components/campaign/AddScenarioResultView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function AddScenarioResultView() {

const state = navigation.getState();
const routes = dropWhile(
reverse([...state?.routes ?? []]),
reverse([...(state?.routes ?? [])]),
r => r.name === 'Campaign.AddResult'
).reverse();
navigation.reset({
Expand Down Expand Up @@ -183,20 +183,8 @@ function AddScenarioResultView() {

AddScenarioResultView.options = () => {
return {
topBar: {
title: {
text: t`Scenario Result`,
},
backButton: {
title: t`Cancel`,
},
rightButtonDisabledColor: COLORS.darkGray,
rightButtons: [{
text: t`Save`,
id: 'save',
color: COLORS.M,
}],
},
title: t`Scenario Result`,
headerBackTitle: t`Cancel`,
};
};
export default AddScenarioResultView;
Expand Down
9 changes: 0 additions & 9 deletions src/components/campaign/CampaignDetailView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,6 @@ function CampaignDetailView() {
);
}

CampaignDetailView.options = () => {
return {
topBar: {
title: {
text: t`Campaign`,
},
},
};
};
export default CampaignDetailView;

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion src/components/campaign/CampaignScenarioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
View,
} from 'react-native';
import { t } from 'ttag';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';

import NavButton from '@components/core/NavButton';
import space, { s } from '@styles/space';
Expand Down
2 changes: 1 addition & 1 deletion src/components/campaign/MyDecksSelectorDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function MyDecksSelectorDialog() {
toggleHideOtherCampaignDecks, toggleHideEliminatedInvestigators, toggleOnlyShowPreviousCampaignMembers]);
const onlyInvestigators = useMemo(() => {
if (investigatorId) {
return new Set([investigatorId, ...investigatorSet?.alternate_codes ?? []]);
return new Set([investigatorId, ...(investigatorSet?.alternate_codes ?? [])]);
}
return undefined;
}, [investigatorId, investigatorSet]);
Expand Down
12 changes: 1 addition & 11 deletions src/components/campaign/NewCampaignView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function NewCampaignView() {
const selection = campaignChoice.selection;
const state = navigation.getState();
const routes = dropWhile(
reverse([...state?.routes ?? []]),
reverse([...(state?.routes ?? [])]),
r => r.name === 'Campaign.New'
).reverse();
if (selection.type === 'campaign') {
Expand Down Expand Up @@ -649,16 +649,6 @@ function NewCampaignView() {
);
}

NewCampaignView.options = () => {
return {
topBar: {
title: {
text: t`New Campaign`,
},
},
};
};

export default NewCampaignView;

const styles = StyleSheet.create({
Expand Down
4 changes: 2 additions & 2 deletions src/components/campaign/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,12 @@ export function editScenarioResult(
return async(dispatch) => {
if (campaign) {
const scenarioResults = [
...campaign.scenarioResults || [],
...(campaign.scenarioResults || []),
];
scenarioResults[index] = { ...scenarioResult };
dispatch(updateCampaignScenarioResults(actions, campaign.id, scenarioResults));
}
}
};
}

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/components/campaignguide/CampaignLogComponent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback, useContext, useMemo } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { flatMap, keys, range, map, sum, values } from 'lodash';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialIcons from '@react-native-vector-icons/material-icons';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';
import { t } from 'ttag';

import ChaosBagLine from '@components/core/ChaosBagLine';
Expand Down
2 changes: 1 addition & 1 deletion src/components/campaignguide/InvestigatorButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useContext } from 'react';
import { Text, View } from 'react-native';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';

import StyleContext from '@styles/StyleContext';
import CompactInvestigatorRow from '@components/core/CompactInvestigatorRow';
Expand Down
6 changes: 3 additions & 3 deletions src/components/campaignguide/NarrationWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ViewStyle,
} from 'react-native';
import { t } from 'ttag';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import MaterialIcons, { MaterialIconsIconName } from '@react-native-vector-icons/material-icons';

import { TouchableOpacity } from '@components/core/Touchables';
import EncounterIcon from '@icons/EncounterIcon';
Expand Down Expand Up @@ -253,7 +253,7 @@ function TitleView({ style, track }: TitleProps) {
}

interface PlaybackButtonProps {
name: string;
name: MaterialIconsIconName;
size?: number;
disabled?: boolean;
onPress?: () => void;
Expand Down Expand Up @@ -294,7 +294,7 @@ function ReplayButton({ onPress }: ButtonProps) {
}

function InfoButton({ onPress }: ButtonProps) {
return <PlaybackButton size={24} name="info" onPress={onPress} />;
return <PlaybackButton name="info" onPress={onPress} size={24} />;
}

interface NarratorContainerProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/campaignguide/prompts/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useMemo } from 'react';
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';

import Ripple from '@lib/react-native-material-ripple';
import StyleContext from '@styles/StyleContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export default function ChooseInvestigatorPrompt({
</View>
{ choice !== undefined && (
// TODO: need to handle no-choice here?
!!renderResults && renderResults(
(!!renderResults && renderResults(
selectedIndex === -1 ? undefined : theInvestigators[selectedIndex]
))
)))
}
</InputWrapper>
);
Expand Down
2 changes: 0 additions & 2 deletions src/components/campaignguide/withCampaignGuideContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import hoistNonReactStatic from 'hoist-non-react-statics';
import { t } from 'ttag';

import CampaignGuideContext, { CampaignGuideContextType } from '@components/campaignguide/CampaignGuideContext';
Expand Down Expand Up @@ -57,6 +56,5 @@ export default function withCampaignGuideContext<Props>(
);
}

hoistNonReactStatic(CampaignDataComponent, WrappedComponent);
return CampaignDataComponent;
}
Loading