Skip to content

Commit e437753

Browse files
committed
chore: wip
1 parent 2bc3ba4 commit e437753

File tree

222 files changed

+4544
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+4544
-37
lines changed

packages/app-explorer/src/app/global-error.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
'use client';
2-
import '@fuels/ui/styles.css';
3-
import './error.css';
4-
import './globals.css';
1+
"use client";
2+
import "@fuels/ui/styles.css";
3+
import "./error.css";
4+
import "./globals.css";
55

6-
import Cookies from 'js-cookie';
7-
import type { Metadata } from 'next';
8-
import { ErrorPageComponent } from '~/systems/Core/components/ErrorPage/ErrorPage';
9-
import { Provider } from '~/systems/Core/components/Provider';
10-
import { cx } from '~/systems/Core/utils/cx';
6+
import Cookies from "js-cookie";
7+
import type { Metadata } from "next";
8+
import { ErrorPageComponent } from "~/systems/Core/components/ErrorPage/ErrorPage";
9+
import { Provider } from "~/systems/Core/components/Provider";
10+
import { cx } from "~/systems/Core/utils/cx";
1111

1212
export const metadata: Metadata = {
13-
title: 'Fuel Explorer',
14-
description: 'Explorer of the Fastest execution layer',
13+
title: "Fuel Explorer",
14+
description: "Explorer of the Fastest execution layer",
1515
};
1616

1717
export default function Page() {
18-
const value = Cookies.get('fuel-theme') ?? 'dark';
18+
const value = Cookies.get("fuel-theme") ?? "dark";
1919
return (
2020
<html
2121
suppressHydrationWarning
@@ -27,7 +27,7 @@ export default function Page() {
2727
<link rel="icon" href="/favicon.svg" />
2828
</head>
2929
<body>
30-
<Provider theme={value}>
30+
<Provider>
3131
<ErrorPageComponent />
3232
</Provider>
3333
</body>

packages/app-explorer/src/app/layout.tsx

+16-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
import '@fuels/ui/styles.css';
2-
import './globals.css';
1+
import "@fuels/ui/styles.css";
2+
import "./globals.css";
33

4-
import { GeistMono } from 'geist/font/mono';
5-
import { GeistSans } from 'geist/font/sans';
6-
import type { Metadata } from 'next';
7-
import { cookies } from 'next/headers';
8-
import { Layout } from '~/systems/Core/components/Layout/Layout';
9-
import { Provider } from '~/systems/Core/components/Provider';
10-
import { cx } from '~/systems/Core/utils/cx';
4+
import { GeistMono } from "geist/font/mono";
5+
import { GeistSans } from "geist/font/sans";
6+
import type { Metadata } from "next";
7+
import { cookies } from "next/headers";
8+
import { Layout } from "~/systems/Core/components/Layout/Layout";
9+
import { Provider } from "~/systems/Core/components/Provider";
10+
import { cx } from "~/systems/Core/utils/cx";
11+
import Script from "next/script";
1112

1213
export const metadata: Metadata = {
13-
title: 'Fuel Explorer',
14-
description: 'Explorer of the Fastest execution layer',
14+
title: "Fuel Explorer",
15+
description: "Explorer of the Fastest execution layer",
1516
};
1617

1718
export default function RootLayout({
1819
children,
1920
}: {
2021
children: React.ReactNode;
2122
}) {
22-
const { value: theme } = cookies().get('fuel-theme') ?? { value: 'dark' };
23+
const { value: theme } = cookies().get("fuel-theme") ?? { value: "dark" };
24+
//const theme = "dark"; // Initial default theme
25+
console.log(`theme`, theme);
2326
return (
2427
<html
2528
suppressHydrationWarning
@@ -31,7 +34,7 @@ export default function RootLayout({
3134
<link rel="icon" href="/favicon.svg" />
3235
</head>
3336
<body>
34-
<Provider theme={theme}>
37+
<Provider>
3538
<Layout contentClassName="[&_.rt-ContainerInner]:space-y-10">
3639
{children}
3740
</Layout>

packages/app-explorer/src/systems/Core/components/Provider/Provider.tsx

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
'use client';
1+
"use client";
22

3-
import { Theme, Toaster } from '@fuels/ui';
3+
import { Theme, Toaster } from "@fuels/ui";
4+
import { useEffect, useState } from "react";
45

5-
export function Provider({
6-
children,
7-
theme,
8-
}: {
9-
children: React.ReactNode;
10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11-
theme: any;
12-
}) {
6+
export function Provider({ children }: { children: React.ReactNode }) {
7+
const [theme, setTheme] = useState<string>("dark");
8+
useEffect(() => {
9+
setTheme(localStorage.getItem("fuel-ui-theme") ?? "dark");
10+
}, []);
11+
console.log(`theme2`, theme);
1312
return (
14-
<Theme appearance={theme} hasBackground={false}>
13+
<Theme appearance={theme as any} hasBackground={false}>
1514
{children}
1615
<Toaster />
1716
</Theme>

packages/app/public/ui/assets/Accordion.stories-WPEM2MeX.js

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/app/public/ui/assets/Address.stories-1z86x2an.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/app/public/ui/assets/Alert.stories-rOFqN6fL.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)