Skip to content

Commit

Permalink
Updates all files in flame defi to kabab case
Browse files Browse the repository at this point in the history
tries to clear cache

updates imports
  • Loading branch information
matthew-garrett committed Feb 21, 2025
1 parent 0bf09f3 commit 27bf5f3
Show file tree
Hide file tree
Showing 77 changed files with 136 additions and 138 deletions.
10 changes: 5 additions & 5 deletions apps/flame-defi/app/bridge/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import type React from "react";
import { useState } from "react";

import DepositCard from "components/DepositCard/DepositCard";
import WithdrawCard from "components/WithdrawCard/WithdrawCard";
import DepositCard from "components/deposit-card/deposit-card";
import WithdrawCard from "components/withdraw-card/withdraw-card";

type TabType = "DEPOSIT" | "WITHDRAW";

Expand Down Expand Up @@ -43,9 +43,9 @@ export default function BridgePage(): React.ReactElement {
const tabs: TabType[] = ["DEPOSIT", "WITHDRAW"];

return (
<section className="min-h-[calc(100vh-85px-96px)] flex flex-col items-center mt-[100px]">
<div className="w-full px-0 md:px-4 lg:px-4 md:w-2/3 lg:w-2/3 xl:w-1/2 max-w-[676px]">
<div className="p-4 sm:p-4 md:p-8 lg:p-12 bg-[radial-gradient(144.23%_141.13%_at_50.15%_0%,#221F1F_0%,#050A0D_100%)] shadow-[inset_1px_1px_1px_-1px_rgba(255,255,255,0.5)] rounded-2xl">
<section className="w-full min-h-[calc(100vh-85px-96px)] flex flex-col items-center mt-[100px]">
<div className="w-full px-0 md:w-[675px] lg:px-4">
<div className="px-4 py-12 sm:px-4 lg:p-12 bg-[radial-gradient(144.23%_141.13%_at_50.15%_0%,#221F1F_0%,#050A0D_100%)] shadow-[inset_1px_1px_1px_-1px_rgba(255,255,255,0.5)] rounded-2xl">
<div className="flex items-center justify-center p-1 w-full bg-semi-white border-[1px] border-white/20 rounded-xl border-b-0 border-r-0 mb-5">
<ul className="flex w-full text-center">
{tabs.map((tab) => (
Expand Down
3 changes: 1 addition & 2 deletions apps/flame-defi/app/components/Navbar/Navbar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { screen } from "@testing-library/react";

import { renderWithProviders } from "testing/helpers";
import Navbar from "./Navbar";
import Navbar from "./navbar";

describe("Navbar Component", () => {
test("renders company logo", () => {
Expand Down
10 changes: 5 additions & 5 deletions apps/flame-defi/app/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use client";

import { FlameIcon } from "@repo/ui/icons";
import ConnectWalletsButton from "components/ConnectWalletsButton/ConnectWalletsButton";
import ConnectWalletsButton from "components/connect-wallets-button/connect-wallets-button";
import { useConfig } from "config";
import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";
import MobileNav from "../MobileNav/MobileNav";
import NetworkSelector from "../NetworkSelector/NetworkSelector";
import MobileNav from "../mobile-nav/mobile-nav";
import NetworkSelector from "../network-selector/network-selector";

function Navbar() {
const Navbar = () => {
const pathname = usePathname();
const { brandURL } = useConfig();

Expand Down Expand Up @@ -77,6 +77,6 @@ function Navbar() {
<MobileNav />
</nav>
);
}
};

export default Navbar;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
ConnectCosmosWalletButton,
useCosmosWallet,
} from "features/CosmosWallet";
} from "features/cosmos-wallet";
import {
ConnectEvmWalletButton,
SingleWalletConnect,
} from "features/EvmWallet";
} from "features/evm-wallet";
import {
Button,
Popover,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Decimal } from "@cosmjs/math";
import type React from "react";
import { useCallback, useEffect, useMemo, useState } from "react";
import { Dropdown } from "@repo/ui/components";
import { sendIbcTransfer, useCosmosWallet } from "features/CosmosWallet";
import { AddErc20ToWalletButton, useEvmWallet } from "features/EvmWallet";
import { NotificationType, useNotifications } from "features/Notifications";
import { sendIbcTransfer, useCosmosWallet } from "features/cosmos-wallet";
import { AddErc20ToWalletButton, useEvmWallet } from "features/evm-wallet";
import { NotificationType, useNotifications } from "features/notifications";
import { ActionButton, AnimatedArrowSpacer } from "@repo/ui/components";
import {
ArrowUpDownIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DrawerContent,
DrawerTrigger,
} from "@repo/ui/shadcn-primitives";
import MobileWalletConnect from "components/MobileWalletConnect/MobileWalletConnect";
import MobileWalletConnect from "components/mobile-wallet-connect/mobile-wallet-connect";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useCallback, useEffect, useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import {
DrawerTrigger,
} from "@repo/ui/shadcn-primitives";
import { Drawer } from "@repo/ui/shadcn-primitives";
import { SingleWalletContent, useEvmWallet } from "features/EvmWallet";
import { SingleWalletContent, useEvmWallet } from "features/evm-wallet";
import {
ConnectCosmosWalletButton,
useCosmosWallet,
} from "features/CosmosWallet";
import { ConnectEvmWalletButton } from "features/EvmWallet";
} from "features/cosmos-wallet";
import { ConnectEvmWalletButton } from "features/evm-wallet";
import { useConfig } from "config";
import { CheckMarkIcon, FlameIcon } from "@repo/ui/icons";
import { FlameNetwork } from "@repo/flame-types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import type React from "react";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useConfig as useWagmiConfig } from "wagmi";
import { Dropdown } from "@repo/ui/components";
import { useCosmosWallet } from "features/CosmosWallet";
import { useCosmosWallet } from "features/cosmos-wallet";
import {
AddErc20ToWalletButton,
createWithdrawerService,
useEvmWallet,
} from "features/EvmWallet";
import { NotificationType, useNotifications } from "features/Notifications";
} from "features/evm-wallet";
import { NotificationType, useNotifications } from "features/notifications";
import { ArrowUpDownIcon, WalletIcon } from "@repo/ui/icons";
import { ActionButton, AnimatedArrowSpacer } from "@repo/ui/components";
import { formatDecimalValues, shortenAddress } from "@repo/ui/utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export interface ChainConfigsObject {

export type NetworkConfigs = Record<FlameNetwork, FlameNetworkConfig>;

import * as dawn from "./ChainConfigsDawn";
import * as dusk from "./ChainConfigsDusk";
import * as local from "./ChainConfigsLocal";
import * as mainnet from "./ChainConfigsMainnet";
import * as dawn from "./chain-configs-dawn";
import * as dusk from "./chain-configs-dusk";
import * as local from "./chain-configs-local";
import * as mainnet from "./chain-configs-mainnet";

const NETWORK_CONFIGS: NetworkConfigs = {
[FlameNetwork.LOCAL]: {
Expand Down
2 changes: 1 addition & 1 deletion apps/flame-defi/app/config/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getChainConfigs } from "./chainConfigs";
import { getChainConfigs } from "./chain-configs";
import { FlameNetwork } from "@repo/flame-types";

describe("Chain Configs", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import type React from "react";

import { useConfig } from "config/hooks/useConfig";
import { useConfig } from "config/hooks/use-config";
import { renderWithProviders } from "testing/helpers";

const TestComponent: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { getChainConfigs } from "../chainConfigs";
import { getChainConfigs } from "../chain-configs";
import { getEnvVariable } from "../env";
import type { AppConfig } from "../index";
import { CosmosChains, EvmChains, FlameNetwork } from "@repo/flame-types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useContext } from "react";
import { ConfigContext } from "../contexts/ConfigContext";
import { ConfigContext } from "../contexts/config-context";
import { EvmChainInfo } from "@repo/flame-types";

/**
Expand Down
6 changes: 3 additions & 3 deletions apps/flame-defi/app/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {
getAllChainConfigs,
getFlameChainId,
getFlameNetworkByChainId,
} from "./chainConfigs";
import { ConfigContextProvider } from "./contexts/ConfigContext";
} from "./chain-configs";
import { ConfigContextProvider } from "./contexts/config-context";
import { getEnvVariable } from "./env";
import { useConfig, useEvmChainData } from "./hooks/useConfig";
import { useConfig, useEvmChainData } from "./hooks/use-config";
import { CosmosChains, EvmChains, FlameNetwork } from "@repo/flame-types";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { useConfig } from "config/hooks/useConfig";
import { useConfig } from "config/hooks/use-config";
import { graphql } from "earn/gql";
import { TimeseriesOptions } from "earn/gql/graphql";
import request from "graphql-request";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { useConfig } from "config/hooks/useConfig";
import { useConfig } from "config/hooks/use-config";
import { graphql } from "earn/gql";
import {
OrderDirection,
Expand Down
11 changes: 0 additions & 11 deletions apps/flame-defi/app/features/CosmosWallet/index.ts

This file was deleted.

Empty file.
27 changes: 0 additions & 27 deletions apps/flame-defi/app/features/EvmWallet/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/flame-defi/app/features/GetBalancePolling/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { fireEvent, render, screen } from "@testing-library/react";
import type React from "react";

import Notification from "./Notification";
import Notification from "./notification";
import { NotificationType } from "./types";

describe("Notification Component", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ interface NotificationProps {
}

// Notification is used for toast and modal notifications
function Notification({
const Notification = ({
id,
onRemove,
modalOpts,
toastOpts,
}: NotificationProps) {
}: NotificationProps) => {
// if modalOpts exists, we should display in modal mode
const isModal: boolean = modalOpts !== undefined;

Expand Down Expand Up @@ -141,6 +141,6 @@ function Notification({
{isModal ? <ModalElem /> : <ToastElem />}
</div>
);
}
};

export default Notification;
export default Notification;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { v4 as uuidv4 } from "uuid";
import type {
AddNotificationOpts,
Notification,
} from "../components/Notification/types";
} from "../components/notification/types";

export interface NotificationsContextProps {
notifications: Notification[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext } from "react";
import {
NotificationsContext,
type NotificationsContextProps,
} from "../contexts/NotificationsContext";
} from "../contexts/notifications-context";

// hook to make NotificationsContext easier to access
export const useNotifications = (): NotificationsContextProps => {
Expand Down
8 changes: 4 additions & 4 deletions apps/flame-defi/app/features/Notifications/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Notification from "./components/Notification/Notification";
import { NotificationType } from "./components/Notification/types";
import Notification from "./components/notification/notification";
import { NotificationType } from "./components/notification/types";
import {
NotificationsContext,
NotificationsContextProvider,
} from "./contexts/NotificationsContext";
import { useNotifications } from "./hooks/useNotifications";
} from "./contexts/notifications-context";
import { useNotifications } from "./hooks/use-notifications";

export {
Notification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
useState,
} from "react";
import { CopyToClipboardButton } from "@repo/ui/components";
import { useCosmosWallet } from "../../hooks/useCosmosWallet";
import { useCosmosWallet } from "../../hooks/use-cosmos-wallet";
import { formatDecimalValues, shortenAddress } from "@repo/ui/utils";
import { CosmosIcon, PowerIcon, UpRightSquareIcon } from "@repo/ui/icons";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react";
import type { SigningStargateClient } from "@cosmjs/stargate";
import { DropdownOption } from "@repo/ui/components";
import { useConfig } from "config";
import { useBalancePolling } from "features/GetBalancePolling";
import { useBalancePolling } from "features/get-balance-polling";

import { getBalanceFromChain } from "../services/cosmos";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext } from "react";
import {
CosmosWalletContext,
type CosmosWalletContextProps,
} from "../contexts/CosmosWalletContext";
} from "../contexts/cosmos-wallet-context";

export const useCosmosWallet = (): CosmosWalletContextProps => {
const context = useContext(CosmosWalletContext);
Expand Down
11 changes: 11 additions & 0 deletions apps/flame-defi/app/features/cosmos-wallet/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ConnectCosmosWalletButton from "./components/connect-cosmos-wallet-button/connect-cosmos-wallet-button";
import { CosmosWalletProvider } from "./contexts/cosmos-wallet-context";
import { useCosmosWallet } from "./hooks/use-cosmos-wallet";
import { sendIbcTransfer } from "./services/cosmos";

export {
ConnectCosmosWalletButton,
CosmosWalletProvider,
useCosmosWallet,
sendIbcTransfer,
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useAccount } from "wagmi";

import { CopyToClipboardButton } from "@repo/ui/components";

import { useEvmWallet } from "../../hooks/useEvmWallet";
import { useEvmWallet } from "../../hooks/use-evm-wallet";
import { formatDecimalValues, shortenAddress } from "@repo/ui/utils";
import { FlameIcon, PowerIcon, UpRightSquareIcon } from "@repo/ui/icons";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAccount } from "wagmi";
import { CopyToClipboardButton } from "@repo/ui/components";
import { useEvmWallet } from "../../hooks/useEvmWallet";
import { useEvmWallet } from "../../hooks/use-evm-wallet";
import { formatDecimalValues, shortenAddress } from "@repo/ui/utils";
import { FlameIcon, PowerIcon, UpRightSquareIcon } from "@repo/ui/icons";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import {
useConfig as useAppConfig,
useEvmChainData,
} from "config";
import { useBalancePolling } from "features/GetBalancePolling";
import { useBalancePolling } from "features/get-balance-polling";

import {
type AstriaErc20WithdrawerService,
createWithdrawerService,
} from "../services/AstriaWithdrawerService/AstriaWithdrawerService";
} from "../services/astria-withdrawer-service/astria-withdrawer-service";
import {
EvmChainInfo,
evmChainToRainbowKitChain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext } from "react";
import {
EvmWalletContext,
type EvmWalletContextProps,
} from "../contexts/EvmWalletContext";
} from "../contexts/evm-wallet-context";

export const useEvmWallet = (): EvmWalletContextProps => {
const context = useContext(EvmWalletContext);
Expand Down
Loading

0 comments on commit 27bf5f3

Please sign in to comment.