Skip to content

Commit 23e3d11

Browse files
committed
chore(template): reformat app and component content files
1 parent 184d715 commit 23e3d11

7 files changed

Lines changed: 148 additions & 100 deletions

File tree

packages/create-sei/templates/next-template/src/app/development/page.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'use client';
1+
"use client";
22

3-
import { Shell } from '@/components';
4-
import { Button, Card, Code, Container, Group, Paper, Stack, Text, ThemeIcon, Title } from '@mantine/core';
5-
import { IconCode, IconExternalLink } from '@tabler/icons-react';
3+
import { Button, Card, Code, Container, Group, Paper, Stack, Text, ThemeIcon, Title } from "@mantine/core";
4+
import { IconCode, IconExternalLink } from "@tabler/icons-react";
5+
import { Shell } from "@/components";
66

77
export default function DevelopmentPage() {
88
return (
@@ -42,7 +42,7 @@ export default function DevelopmentPage() {
4242
component="a"
4343
href="https://wagmi.sh/react/getting-started"
4444
target="_blank"
45-
style={{ textDecoration: 'none', cursor: 'pointer' }}
45+
style={{ textDecoration: "none", cursor: "pointer" }}
4646
>
4747
<Group gap="sm" justify="space-between">
4848
<Group gap="sm">
@@ -62,7 +62,7 @@ export default function DevelopmentPage() {
6262
component="a"
6363
href="https://viem.sh/"
6464
target="_blank"
65-
style={{ textDecoration: 'none', cursor: 'pointer' }}
65+
style={{ textDecoration: "none", cursor: "pointer" }}
6666
>
6767
<Group gap="sm" justify="space-between">
6868
<Group gap="sm">
@@ -82,7 +82,7 @@ export default function DevelopmentPage() {
8282
component="a"
8383
href="https://www.rainbowkit.com/docs/introduction"
8484
target="_blank"
85-
style={{ textDecoration: 'none', cursor: 'pointer' }}
85+
style={{ textDecoration: "none", cursor: "pointer" }}
8686
>
8787
<Group gap="sm" justify="space-between">
8888
<Group gap="sm">

packages/create-sei/templates/next-template/src/app/layout.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { Providers } from '@/components/providers';
2-
import { ColorSchemeScript } from '@mantine/core';
3-
import type { Metadata } from 'next';
4-
import { Inter } from 'next/font/google';
5-
import type { ReactNode } from 'react';
1+
import { ColorSchemeScript } from "@mantine/core";
2+
import type { Metadata } from "next";
3+
import { Inter } from "next/font/google";
4+
import type { ReactNode } from "react";
5+
import { Providers } from "@/components/providers";
66

7-
import './globals.css';
8-
import '@mantine/core/styles.css';
9-
import '@mantine/notifications/styles.css';
7+
import "./globals.css";
8+
import "@mantine/core/styles.css";
9+
import "@mantine/notifications/styles.css";
1010

11-
const inter = Inter({ subsets: ['latin'] });
11+
const inter = Inter({ subsets: ["latin"] });
1212

1313
export const metadata: Metadata = {
14-
title: 'Sei Next App (Wagmi)',
15-
description: 'Generated by create sei app',
14+
title: "Sei Next App (Wagmi)",
15+
description: "Generated by create sei app",
1616
};
1717

1818
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {

packages/create-sei/templates/next-template/src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
'use client';
1+
"use client";
22

3-
import { Default, Landing, Shell } from '@/components';
4-
import { useAccount } from 'wagmi';
3+
import { useAccount } from "wagmi";
4+
import { Default, Landing, Shell } from "@/components";
55

66
export default function Home() {
77
const { isConnected } = useAccount();

packages/create-sei/templates/next-template/src/app/resources/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { developerResources, socialLinks } from '@/app/resources/resources';
2-
import { Shell } from '@/components';
3-
import { Card, Code, Container, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from '@mantine/core';
4-
import { IconBook, IconRobot, IconTerminal } from '@tabler/icons-react';
1+
import { Card, Code, Container, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from "@mantine/core";
2+
import { IconBook, IconRobot, IconTerminal } from "@tabler/icons-react";
3+
import { developerResources, socialLinks } from "@/app/resources/resources";
4+
import { Shell } from "@/components";
55

66
export default function ResourcesPage() {
77
return (
@@ -151,7 +151,7 @@ export default function ResourcesPage() {
151151
{socialLinks.map(({ title, description, href, icon: Icon, color }) => (
152152
<Card key={title} withBorder radius="lg" p="lg" component="a" href={href} target="_blank" rel="noreferrer" shadow="sm">
153153
<Group align="flex-start" wrap="nowrap" gap="md">
154-
<ThemeIcon variant="light" color={color === 'dark' ? 'gray' : (color as any)} size={36} radius="md">
154+
<ThemeIcon variant="light" color={color === "dark" ? "gray" : (color as any)} size={36} radius="md">
155155
<Icon size={20} />
156156
</ThemeIcon>
157157
<Stack gap={4} flex={1}>
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
import { IconBook, IconBrandTelegram, IconBrandX, IconCode, IconPackage } from '@tabler/icons-react';
1+
import { IconBook, IconBrandTelegram, IconBrandX, IconCode, IconPackage } from "@tabler/icons-react";
22

33
export const developerResources = [
44
{
5-
title: 'Sei Docs',
6-
description: 'Official protocol docs, guides, and references.',
7-
href: 'https://docs.sei.io/',
5+
title: "Sei Docs",
6+
description: "Official protocol docs, guides, and references.",
7+
href: "https://docs.sei.io/",
88
icon: IconBook,
9-
color: 'violet',
9+
color: "violet",
1010
},
1111
{
12-
title: '@sei-js docs',
13-
description: 'SDKs, examples, templates, and tooling for Sei.',
14-
href: 'https://sei-js.docs.sei.io/introduction',
12+
title: "@sei-js docs",
13+
description: "SDKs, examples, templates, and tooling for Sei.",
14+
href: "https://sei-js.docs.sei.io/introduction",
1515
icon: IconBook,
16-
color: 'grape',
16+
color: "grape",
1717
},
1818
{
19-
title: 'Wagmi',
20-
description: 'React hooks for Ethereum development.',
21-
href: 'https://wagmi.sh/',
19+
title: "Wagmi",
20+
description: "React hooks for Ethereum development.",
21+
href: "https://wagmi.sh/",
2222
icon: IconCode,
23-
color: 'blue',
23+
color: "blue",
2424
},
2525
{
26-
title: 'Viem',
27-
description: 'TypeScript interface for Ethereum.',
28-
href: 'https://viem.sh/',
26+
title: "Viem",
27+
description: "TypeScript interface for Ethereum.",
28+
href: "https://viem.sh/",
2929
icon: IconPackage,
30-
color: 'green',
30+
color: "green",
3131
},
3232
] as const;
3333

3434
export const socialLinks = [
3535
{
36-
title: 'Developer Telegram',
37-
description: 'Chat with the community and get support.',
38-
href: 'https://t.me/seinetwork',
36+
title: "Developer Telegram",
37+
description: "Chat with the community and get support.",
38+
href: "https://t.me/seinetwork",
3939
icon: IconBrandTelegram,
40-
color: 'cyan',
40+
color: "cyan",
4141
},
4242
{
43-
title: 'Sei on X',
44-
description: 'Follow Sei Network updates on X (Twitter).',
45-
href: 'https://x.com/SeiNetwork',
43+
title: "Sei on X",
44+
description: "Follow Sei Network updates on X (Twitter).",
45+
href: "https://x.com/SeiNetwork",
4646
icon: IconBrandX,
47-
color: 'dark',
47+
color: "dark",
4848
},
4949
{
50-
title: 'Sei Labs on X',
51-
description: 'Follow Sei Labs announcements on X (Twitter).',
52-
href: 'https://x.com/Sei_Labs',
50+
title: "Sei Labs on X",
51+
description: "Follow Sei Labs announcements on X (Twitter).",
52+
href: "https://x.com/Sei_Labs",
5353
icon: IconBrandX,
54-
color: 'dark',
54+
color: "dark",
5555
},
5656
] as const;

packages/create-sei/templates/next-template/src/components/default/index.tsx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
'use client';
1+
"use client";
22

3-
import { CodeHighlight } from '@mantine/code-highlight';
3+
import { CodeHighlight } from "@mantine/code-highlight";
44
import {
55
ActionIcon,
66
Alert,
@@ -19,18 +19,18 @@ import {
1919
TextInput,
2020
ThemeIcon,
2121
Title,
22-
} from '@mantine/core';
23-
import { notifications } from '@mantine/notifications';
24-
import { IconBulb, IconChevronDown, IconChevronUp, IconCoins, IconCopy, IconLogout, IconSend, IconWallet } from '@tabler/icons-react';
25-
import { useState } from 'react';
26-
import { formatEther, parseEther } from 'viem';
27-
import { useAccount, useDisconnect, usePublicClient, useSendTransaction, useWaitForTransactionReceipt } from 'wagmi';
28-
import { balanceCodeExample, transactionCodeExample, walletCodeExample } from './examples';
22+
} from "@mantine/core";
23+
import { notifications } from "@mantine/notifications";
24+
import { IconBulb, IconChevronDown, IconChevronUp, IconCoins, IconCopy, IconLogout, IconSend, IconWallet } from "@tabler/icons-react";
25+
import { useState } from "react";
26+
import { formatEther, parseEther } from "viem";
27+
import { useAccount, useDisconnect, usePublicClient, useSendTransaction, useWaitForTransactionReceipt } from "wagmi";
28+
import { balanceCodeExample, transactionCodeExample, walletCodeExample } from "./examples";
2929

3030
function Examples() {
31-
const [balance, setBalance] = useState('');
32-
const [recipient, setRecipient] = useState('');
33-
const [amount, setAmount] = useState('');
31+
const [balance, setBalance] = useState("");
32+
const [recipient, setRecipient] = useState("");
33+
const [amount, setAmount] = useState("");
3434

3535
// Code visibility toggles
3636
const [showWalletCode, setShowWalletCode] = useState(false);
@@ -51,17 +51,17 @@ function Examples() {
5151
try {
5252
navigator.clipboard.writeText(text).then(() => {
5353
notifications.show({
54-
title: 'Copied!',
55-
message: 'Code copied to clipboard',
56-
color: 'green',
54+
title: "Copied!",
55+
message: "Code copied to clipboard",
56+
color: "green",
5757
});
5858
});
5959
} catch (err) {
60-
console.error('Failed to copy text: ', err);
60+
console.error("Failed to copy text: ", err);
6161
notifications.show({
62-
title: 'Error',
63-
message: 'Failed to copy to clipboard',
64-
color: 'red',
62+
title: "Error",
63+
message: "Failed to copy to clipboard",
64+
color: "red",
6565
});
6666
}
6767
};
@@ -78,9 +78,9 @@ function Examples() {
7878
const sendSei = async () => {
7979
if (!recipient || !amount) {
8080
notifications.show({
81-
title: 'Missing Information',
82-
message: 'Please enter recipient address and amount',
83-
color: 'orange',
81+
title: "Missing Information",
82+
message: "Please enter recipient address and amount",
83+
color: "orange",
8484
});
8585
return;
8686
}
@@ -91,11 +91,11 @@ function Examples() {
9191
value: parseEther(amount),
9292
});
9393
} catch (error) {
94-
console.error('Transaction error:', error);
94+
console.error("Transaction error:", error);
9595
notifications.show({
96-
title: 'Transaction Error',
97-
message: 'Failed to send transaction',
98-
color: 'red',
96+
title: "Transaction Error",
97+
message: "Failed to send transaction",
98+
color: "red",
9999
});
100100
}
101101
};
@@ -147,7 +147,7 @@ function Examples() {
147147
</Text>
148148
<Flex justify="space-between" align="center">
149149
<Code bg="white" p="xs">
150-
{address || 'No wallet connected'}
150+
{address || "No wallet connected"}
151151
</Code>
152152
{isConnected && address && (
153153
<Group gap="xs">
@@ -171,7 +171,7 @@ function Examples() {
171171
leftSection={showWalletCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
172172
onClick={() => setShowWalletCode(!showWalletCode)}
173173
>
174-
{showWalletCode ? 'Hide' : 'View'} Implementation
174+
{showWalletCode ? "Hide" : "View"} Implementation
175175
</Button>
176176
{showWalletCode && (
177177
<ActionIcon variant="subtle" color="gray" size="sm" radius="md" onClick={() => copyToClipboard(walletCodeExample)}>
@@ -247,7 +247,7 @@ function Examples() {
247247
color="green"
248248
leftSection={<IconCoins size={14} />}
249249
>
250-
{balance ? 'Refresh' : 'Check Balance'}
250+
{balance ? "Refresh" : "Check Balance"}
251251
</Button>
252252
</Flex>
253253
</Paper>
@@ -261,7 +261,7 @@ function Examples() {
261261
leftSection={showBalanceCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
262262
onClick={() => setShowBalanceCode(!showBalanceCode)}
263263
>
264-
{showBalanceCode ? 'Hide' : 'View'} Implementation
264+
{showBalanceCode ? "Hide" : "View"} Implementation
265265
</Button>
266266
{showBalanceCode && (
267267
<ActionIcon variant="subtle" color="gray" size="sm" radius="md" onClick={() => copyToClipboard(balanceCodeExample)}>
@@ -377,7 +377,7 @@ function Examples() {
377377
leftSection={showTransactionCode ? <IconChevronUp size={14} /> : <IconChevronDown size={14} />}
378378
onClick={() => setShowTransactionCode(!showTransactionCode)}
379379
>
380-
{showTransactionCode ? 'Hide' : 'View'} Implementation
380+
{showTransactionCode ? "Hide" : "View"} Implementation
381381
</Button>
382382
{showTransactionCode && (
383383
<ActionIcon variant="subtle" color="gray" size="sm" radius="xl" onClick={() => copyToClipboard(transactionCodeExample)}>

0 commit comments

Comments
 (0)