mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-17 07:25:41 +00:00
fix: TypeScript errors, shadow deprecations, and build configuration
- Fix shadow style deprecation warnings across components (boxShadow) - Add type declaration files (codec.d.ts, modules.d.ts) - Update metro.config.cjs for proper asset extensions - Update tsconfig.json with module resolution settings - Fix TypeScript errors in shared/lib files - Update app icons (optimized PNG files)
This commit is contained in:
@@ -114,7 +114,7 @@ const DelegationScreen: React.FC = () => {
|
||||
|
||||
// Fetch user's delegations
|
||||
if (selectedAccount) {
|
||||
const userVoting = await api.query.democracy.voting(selectedAccount.address);
|
||||
const userVoting = await api.query.democracy.voting(selectedAccount.address) as any;
|
||||
if (userVoting.isDelegating) {
|
||||
const delegating = userVoting.asDelegating;
|
||||
setUserDelegations([{
|
||||
|
||||
@@ -47,12 +47,12 @@ const ElectionsScreen: React.FC = () => {
|
||||
|
||||
// Fetch commission proposals (acting as elections)
|
||||
if (api.query.dynamicCommissionCollective?.proposals) {
|
||||
const proposalHashes = await api.query.dynamicCommissionCollective.proposals();
|
||||
const proposalHashes = await api.query.dynamicCommissionCollective.proposals() as any;
|
||||
|
||||
const electionsData: ElectionInfo[] = [];
|
||||
|
||||
for (const hash of proposalHashes) {
|
||||
const voting = await api.query.dynamicCommissionCollective.voting(hash);
|
||||
for (const hash of (proposalHashes || [])) {
|
||||
const voting = await api.query.dynamicCommissionCollective.voting(hash) as any;
|
||||
if (voting.isSome) {
|
||||
const voteData = voting.unwrap();
|
||||
electionsData.push({
|
||||
|
||||
@@ -111,7 +111,7 @@ const ForumScreen: React.FC = () => {
|
||||
};
|
||||
|
||||
const getCategoryById = (categoryId: string): Category | undefined => {
|
||||
return CATEGORIES.find(c => c.id === categoryId);
|
||||
return categories.find((c: Category) => c.id === categoryId);
|
||||
};
|
||||
|
||||
const getTimeAgo = (dateString: string): string => {
|
||||
@@ -209,7 +209,7 @@ const ForumScreen: React.FC = () => {
|
||||
📋 All Topics
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{CATEGORIES.map((category) => (
|
||||
{categories.map((category) => (
|
||||
<TouchableOpacity
|
||||
key={category.id}
|
||||
style={[
|
||||
|
||||
Reference in New Issue
Block a user