diff --git a/app/globals.css b/app/globals.css
index 7d028f6b..e9fa7bb9 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -42,4 +42,4 @@ a {
.cl-createOrganization-root {
width: 100%;
-}
+}
\ No newline at end of file
diff --git a/app/layout.tsx b/app/layout.tsx
index ffb11307..66d8e619 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,13 +1,8 @@
import './globals.css';
-import {
- ClerkProvider,
- SignedIn
-} from '@clerk/nextjs/app-beta';
+import 'reshaped/themes/reshaped/theme.css';
+
import { Reshaped, View } from '../components/Reshaped/Reshaped';
import RootStyleRegistry from './registry';
-import { MuiThemeProvider } from '../components/Mui';
-
-import 'reshaped/themes/reshaped/theme.css';
import { SideNavigationBar } from '../components/UI/SideNavigationBar';
export default function RootLayout({
@@ -16,16 +11,14 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
-
-
- {/*
+
+ {/*
will contain the components returned by the nearest parent
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
*/}
-
@@ -35,14 +28,9 @@ export default function RootLayout({
{children}
-
- {/* TODO: Create a new Organization or join an existing one */}
-
-
-
);
}
diff --git a/app/new-account/page.tsx b/app/new-account/page.tsx
index 2b155705..fd67b899 100644
--- a/app/new-account/page.tsx
+++ b/app/new-account/page.tsx
@@ -1,8 +1,7 @@
'use client'
-import { Icon, Text, View } from "../../components/Reshaped/Reshaped";
-// import { CreateOrganization } from "../../components/Clerk";
-import { CreateOrganization } from "@clerk/nextjs";
-import Image from "next/image";
+import { Text, View } from "../../components/Reshaped/Reshaped";
+// import { CreateOrganization } from "@clerk/nextjs";
+// import Image from "next/image";
export default function NewAccount() {
@@ -10,7 +9,7 @@ export default function NewAccount() {
-
+ {/* */}
diff --git a/app/registry.tsx b/app/registry.tsx
index 28d394ff..469600e5 100644
--- a/app/registry.tsx
+++ b/app/registry.tsx
@@ -4,8 +4,6 @@ import React, { useState } from "react";
import { CacheProvider } from "@emotion/react";
import createCache from "@emotion/cache";
import { useServerInsertedHTML } from "next/navigation";
-import { ThemeProvider } from "@mui/material";
-import { theme } from "@dechea/orc.design-tokens.theme.theme";
export default function RootStyleRegistry({
children,
@@ -31,9 +29,7 @@ export default function RootStyleRegistry({
return (
-
- {children}
-
+ {children}
);
}
diff --git a/app/selected-tooth/[section]/[item]/layout.tsx b/app/selected-tooth/[section]/[item]/layout.tsx
index e5f6238b..02c895e6 100644
--- a/app/selected-tooth/[section]/[item]/layout.tsx
+++ b/app/selected-tooth/[section]/[item]/layout.tsx
@@ -1,6 +1,6 @@
-import React from 'react';
-import { SelectedToothItems } from '../../../../components/UI/SelectedToothItems'
+import dynamic from 'next/dynamic'
+const SelectedToothItems = dynamic(() => import('../../../../components/UI/SelectedToothItems').then((comp) => comp.SelectedToothItems))
export default function ItemLayout({ params, children }: { params: any, children: React.ReactNode }) {
return (
diff --git a/app/selected-tooth/[section]/[item]/page.tsx b/app/selected-tooth/[section]/[item]/page.tsx
index 1e54f98d..113138b6 100644
--- a/app/selected-tooth/[section]/[item]/page.tsx
+++ b/app/selected-tooth/[section]/[item]/page.tsx
@@ -1,4 +1,4 @@
-
+'use client'
export default function Page() {
return (<>>)
diff --git a/app/selected-tooth/[section]/page.tsx b/app/selected-tooth/[section]/page.tsx
index ecfa99bd..113138b6 100644
--- a/app/selected-tooth/[section]/page.tsx
+++ b/app/selected-tooth/[section]/page.tsx
@@ -1,3 +1,4 @@
+'use client'
export default function Page() {
return (<>>)
diff --git a/app/selected-tooth/layout.tsx b/app/selected-tooth/layout.tsx
index f743993c..c15e465c 100644
--- a/app/selected-tooth/layout.tsx
+++ b/app/selected-tooth/layout.tsx
@@ -1,9 +1,10 @@
-import React from 'react';
+import dynamic from 'next/dynamic';
import { View, Text, Divider } from '../../components/Reshaped/Reshaped'
-import { SelectedTooth } from '../../components/UI/SelectedTooth';
-import { Cart } from '../../components/UI/Cart';
-import { SelectTeeth } from '../../components/UI/ProstheticSelectionGuide/components/SelectTeeth';
+
+const SelectedTooth = dynamic(() => import('../../components/UI/SelectedTooth').then((comp) => comp.SelectedTooth))
+const Cart = dynamic(() => import('../../components/UI/Cart').then((comp) => comp.Cart))
+const SelectTeeth = dynamic(() => import('../../components/UI/ProstheticSelectionGuide/components/SelectTeeth').then((comp) => comp.SelectTeeth))
export default function SelectedToothLayout({ children }: { children: React.ReactNode }) {
return (
diff --git a/app/selected-tooth/page.tsx b/app/selected-tooth/page.tsx
index ecfa99bd..113138b6 100644
--- a/app/selected-tooth/page.tsx
+++ b/app/selected-tooth/page.tsx
@@ -1,3 +1,4 @@
+'use client'
export default function Page() {
return (<>>)
diff --git a/app/teeth-diagram/page.tsx b/app/teeth-diagram/page.tsx
index 36398ed3..8dc30229 100644
--- a/app/teeth-diagram/page.tsx
+++ b/app/teeth-diagram/page.tsx
@@ -1,9 +1,10 @@
'use-client';
-
-import { ProstheticSelectionGuide } from '../../components/UI/ProstheticSelectionGuide';
+import dynamic from 'next/dynamic';
import { View, Text } from '../../components/Reshaped/Reshaped'
+const ProstheticSelectionGuide = dynamic(() => import('../../components/UI/ProstheticSelectionGuide').then((comp) => comp.ProstheticSelectionGuide))
+
export default function TeethDiagram() {
return (
<>
diff --git a/components/FetchUsers.tsx b/components/FetchUsers.tsx
index 060d7f0e..9c5e80b4 100644
--- a/components/FetchUsers.tsx
+++ b/components/FetchUsers.tsx
@@ -1,17 +1,17 @@
"use client"
-import { useAuth } from "@clerk/nextjs";
+// import { useAuth } from "@clerk/nextjs";
import { Suspense } from "react";
import { useQuery } from "../src/gqty";
// TODO We need to rewrite to use SSR
function Fetch() {
- const { getToken } = useAuth();
+ // const { getToken } = useAuth();
- getToken({ template: 'fauna' }).then((token) => {
- console.log(token)
- window.localStorage.setItem("clerk-db-fauna-jwt", JSON.stringify(token));
- })
+ // getToken({ template: 'fauna' }).then((token) => {
+ // console.log(token)
+ // window.localStorage.setItem("clerk-db-fauna-jwt", JSON.stringify(token));
+ // })
const query = useQuery({
diff --git a/components/SignInButton.tsx b/components/SignInButton.tsx
deleted file mode 100644
index 096e40ba..00000000
--- a/components/SignInButton.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-'use client';
-
-import { SignInButton } from '@clerk/nextjs';
-
-export default SignInButton;
\ No newline at end of file
diff --git a/components/UI/Cart/Cart.tsx b/components/UI/Cart/Cart.tsx
index 05c84cdd..ef904e11 100644
--- a/components/UI/Cart/Cart.tsx
+++ b/components/UI/Cart/Cart.tsx
@@ -1,4 +1,6 @@
'use client';
+
+import { useState } from 'react';
import {
Accordion,
View,
@@ -6,7 +8,6 @@ import {
Text,
Button,
} from '../../Reshaped/Reshaped';
-import { useState } from 'react';
const CartSvg = () => (