Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Nov 15, 2024
1 parent 2b0cb41 commit ef8fa9d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
15 changes: 8 additions & 7 deletions packages/fcl-wc/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const config = {
preset: 'jest-preset-preact',
"moduleNameMapper": {
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/mocks/file-mock.ts",
"\\.(css|less)$": "<rootDir>/src/mocks/file-mock.ts"
},
};
preset: "jest-preset-preact",
moduleNameMapper: {
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/src/mocks/file-mock.ts",
"\\.(css|less)$": "<rootDir>/src/mocks/file-mock.ts",
},
}

module.exports = config;
module.exports = config
5 changes: 4 additions & 1 deletion packages/fcl-wc/src/fcl-wc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ const initHelper = (config: FclWalletConnectConfig) => {
if (_client) {
return _client
} else {
return initClient({projectId: config.projectId, metadata: config.metadata})
return initClient({
projectId: config.projectId,
metadata: config.metadata,
})
}
})
.catch(e => {
Expand Down
2 changes: 1 addition & 1 deletion packages/fcl-wc/src/mocks/file-mock.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 'mocked-file'
export default "mocked-file"
2 changes: 1 addition & 1 deletion packages/fcl-wc/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {SignClient} from "@walletconnect/sign-client/dist/types/client"
import {createSessionProposal, request} from "./session"
import {ModalCtrlState} from "@walletconnect/modal-core/dist/_types/src/types/controllerTypes"
import {showWcRequestNotification} from "./ui/notifications"
import type { FclWalletConnectConfig } from "./fcl-wc"
import type {FclWalletConnectConfig} from "./fcl-wc"

type WalletConnectModalType = import("@walletconnect/modal").WalletConnectModal

Expand Down
22 changes: 11 additions & 11 deletions packages/fcl-wc/src/ui/components/Notification.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {NotificationInfo} from "../../types/types"
import { isMobile } from "../../utils"
import {isMobile} from "../../utils"

export function Notification({
title,
Expand All @@ -10,9 +10,10 @@ export function Notification({
}: NotificationInfo) {
return (
<div
className="animate-slideUp fixed bottom-3 left-3 right-3 mx-auto z-[2147483647] flex max-w-sm
overflow-hidden rounded-lg border border-gray-200 bg-white p-4 shadow-lg
md:bottom-4 md:left-auto md:right-4 dark:bg-gray-700 dark:border-gray-600"
className="animate-slideUp fixed bottom-3 left-3 right-3 mx-auto z-[2147483647] flex
max-w-sm overflow-hidden rounded-lg border border-gray-200 bg-white p-4
shadow-lg md:bottom-4 md:left-auto md:right-4 dark:bg-gray-700
dark:border-gray-600"
role="alert"
onClick={e => {
if (onClick) {
Expand All @@ -38,12 +39,11 @@ export function Notification({
</div>

<button
className={`ml-2 inline-flex rounded-full text-gray-400
hover:text-gray-500 focus:ring-0 dark:text-gray-200
dark:hover:text-gray-300
${isMobile() ?
"self-center p-2" :
"self-start p-0 bg-transparent border-transparent focus:border-transparent"
className={`ml-2 inline-flex rounded-full text-gray-400 hover:text-gray-500 focus:ring-0
dark:text-gray-200 dark:hover:text-gray-300 ${
isMobile()
? "self-center p-2"
: "self-start p-0 bg-transparent border-transparent focus:border-transparent"
}`}
onClick={e => {
e.stopPropagation()
Expand All @@ -52,7 +52,7 @@ export function Notification({
>
<span className="sr-only">Close</span>
<svg
className={`h-5 w-5`}
className={"h-5 w-5"}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
Expand Down

0 comments on commit ef8fa9d

Please sign in to comment.