Skip to content

Commit

Permalink
fix(global): lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
emberist committed Jun 3, 2024
1 parent d680352 commit bd4f401
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ShipCard = ({ ship }: Props) => {

const isF = isFirefox();

const url = ship.markets.length
const url = ship.markets?.length
? `https://play.staratlas.com/market/${ship.name
.toLowerCase()
.replace(/\s/g, '-')}`
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend-old/src/stores/useShipsDealsStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const useShipsDealsStore = create<ShipsDealsStore>((set, get) => ({

const data = ships.map((ship) => {
const vwapPrice =
ship.tradeSettings.vwap ?? getEntityVwapPrice(ship.primarySales);
ship.tradeSettings.vwap ?? getEntityVwapPrice(ship.primarySales ?? []);

const buyPrice = Math.min(
...(orders.usdc.sell
Expand Down
10 changes: 5 additions & 5 deletions apps/frontend/src/pages/ships/components/ShipList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { Button, Flex, StarAtlasShip } from '@saibase/uikit';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { useShips } from "../../../../hooks/useShips";
import { Translation } from "../../../../i18n/Translation";
import { useShips } from '../../../../hooks/useShips';
import { Translation } from '../../../../i18n/Translation';

export const ShipList = () => {
const { ships } = useShips();
const { locale } = useRouter();
return (
(<Flex
<Flex
justify="center"
direction="col"
className="grid grid-cols-1 xl:grid-cols-2 gap-5"
>
{ships.map((ship) => {
const url = ship.markets.length
const url = ship.markets?.length
? `https://play.staratlas.com/market/${ship.name
.toLowerCase()
.replace(/\s/g, '-')}`
Expand Down Expand Up @@ -60,6 +60,6 @@ export const ShipList = () => {
/>
);
})}
</Flex>)
</Flex>
);
};
2 changes: 1 addition & 1 deletion apps/frontend/src/stores/useShipsDealsStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const useShipsDealsStore = create<ShipsDealsStore>((set, get) => ({

const data = ships.map((ship) => {
const vwapPrice =
ship.tradeSettings.vwap ?? getEntityVwapPrice(ship.primarySales);
ship.tradeSettings.vwap ?? getEntityVwapPrice(ship.primarySales ?? []);

const buyPrice = Math.min(
...(orders.usdc.sell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const fetchFleetStatsByOwners = async (
...shipsStats.ships,
[ship.mint]: {
...shipsStats.ships[ship.mint],
vwap: getEntityVwapPrice(ship.primarySales),
vwap: getEntityVwapPrice(ship.primarySales ?? []),
mint: ship.mint,
name: ship.name,
attributes: ship.attributes,
Expand Down

0 comments on commit bd4f401

Please sign in to comment.