Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4024e51
Add files via upload
bohdank1995 Jan 17, 2023
bcca061
Merge pull request #1 from mmailaender/images-uploading
bohdank1995 Jan 17, 2023
91239c7
Merge pull request #2 from mmailaender/GQty
bohdank1995 Jan 17, 2023
db03a4d
Decorative elements PoC
Jan 17, 2023
7679c90
Removed clerk until full nextjs 13 support
mmailaender Jan 18, 2023
98e3f99
Removed clerk until support for nextjs13
mmailaender Jan 18, 2023
9de76e2
testing-decorative-elements
Jan 18, 2023
1240b50
Merge branch 'Feature-testing' into main
mmailaender Jan 18, 2023
1f6cdf9
Merge remote-tracking branch 'upstream/main'
madhavKD Jan 19, 2023
c96aa13
Remove clerk from sidebar
madhavKD Jan 19, 2023
0138c1d
Add use client in page component
madhavKD Jan 19, 2023
e3c2cfe
Change runtime to node
madhavKD Jan 19, 2023
4bbc951
Undo runtime
madhavKD Jan 19, 2023
e376a2d
Dynamic import teeth diagram components
madhavKD Jan 19, 2023
867b507
Dynamic import in layout component
madhavKD Jan 20, 2023
95c9117
Comment images
madhavKD Jan 20, 2023
f4119b5
Move dev dependencies in devDependencies object
madhavKD Jan 20, 2023
de69e8b
Add media query to teeth-diagram
MananSoniDechea Jan 20, 2023
6acb004
Move styles from global to styles.css
MananSoniDechea Jan 20, 2023
7b15883
Remove Mui theme provider
madhavKD Jan 20, 2023
ed6538c
Undo commented image component
madhavKD Jan 20, 2023
9f1c8f5
Change styles based on review
MananSoniDechea Jan 20, 2023
af9ee04
Add .npmrc file
madhavKD Jan 20, 2023
421ced6
Add analyser
madhavKD Jan 20, 2023
a26be97
Remove no-typescript
madhavKD Jan 20, 2023
c96d9ec
Comment edge runtime flag
madhavKD Jan 20, 2023
a53390c
Merge pull request #6 from Dechea/feature/take-latest-code-from-origi…
madhavKD Jan 20, 2023
69b76ff
Merge branch 'main' into feature/responsive-teeth-diagram-width
MananSoniDechea Jan 20, 2023
052c37e
Merge pull request #7 from Dechea/feature/responsive-teeth-diagram-width
madhavKD Jan 20, 2023
6068e0b
Merge branch 'main' of https://github.com/Dechea/Denture_Guide_App in…
madhavKD Jan 23, 2023
2dc1a80
Remove dynamic
madhavKD Jan 23, 2023
d89d200
Dynamic import teeth diagram component
madhavKD Jan 23, 2023
c53f72c
Remove dynamic import for teethMapping Obj
madhavKD Jan 23, 2023
acae3bd
Delete .npmrc
madhavKD Jan 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ a {

.cl-createOrganization-root {
width: 100%;
}
}
20 changes: 4 additions & 16 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -16,16 +11,14 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<ClerkProvider>
<html lang="en">
{/*
<html lang="en">
{/*
<head /> 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
*/}
<head />
<body>
<RootStyleRegistry>
<MuiThemeProvider>
<Reshaped theme="reshaped">
<View direction="row" height="100%" width="100%">
<View width="64px">
Expand All @@ -35,14 +28,9 @@ export default function RootLayout({
{children}
</View>
</View>
<SignedIn>
{/* TODO: Create a new Organization or join an existing one */}
</SignedIn>
</Reshaped>
</MuiThemeProvider>
</RootStyleRegistry>
</body>
</html>
</ClerkProvider>
);
}
9 changes: 4 additions & 5 deletions app/new-account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
'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() {
return (
<View gap={5} direction={"column"} align={"center"} >
<View.Item columns={5}>
<View align={"center"}>
<CreateOrganization />
{/* <CreateOrganization /> */}
</View>
</View.Item>
<View.Item columns={5}>
Expand Down
6 changes: 1 addition & 5 deletions app/registry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -31,9 +29,7 @@ export default function RootStyleRegistry({

return (
<CacheProvider value={cache}>
<ThemeProvider theme={theme}>
{children}
</ThemeProvider>
{children}
</CacheProvider>
);
}
4 changes: 2 additions & 2 deletions app/selected-tooth/[section]/[item]/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion app/selected-tooth/[section]/[item]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

'use client'

export default function Page() {
return (<></>)
Expand Down
1 change: 1 addition & 0 deletions app/selected-tooth/[section]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'

export default function Page() {
return (<></>)
Expand Down
9 changes: 5 additions & 4 deletions app/selected-tooth/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
1 change: 1 addition & 0 deletions app/selected-tooth/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'

export default function Page() {
return (<></>)
Expand Down
5 changes: 3 additions & 2 deletions app/teeth-diagram/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
Expand Down
12 changes: 6 additions & 6 deletions components/FetchUsers.tsx
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
5 changes: 0 additions & 5 deletions components/SignInButton.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion components/UI/Cart/Cart.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client';

import { useState } from 'react';
import {
Accordion,
View,
Divider,
Text,
Button,
} from '../../Reshaped/Reshaped';
import { useState } from 'react';

const CartSvg = () => (
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use client';

import React, { useState } from 'react';
import { View, Container } from 'reshaped';
import { View } from 'reshaped';
import { TeethDiagram } from '../../teeth-diagram';
import { TreatmentCard } from '../TreatmentCard';
import { data } from '../__mock__/data';
import { SelectProstheticsButton } from './components/SelectProtheticsButton';
import './styles.css'

export default function ProstheticSelectionGuide() {
const [selectedTooth, setSelectedTooth] = useState<number[]>([]);
Expand Down Expand Up @@ -33,9 +34,11 @@ export default function ProstheticSelectionGuide() {

return (
<>
<View direction={'row'} justify={'center'}>
<View width={{s:"100%", xl:"80%"}} direction={'column'}>
<TeethDiagram toggleToothSelection={toggleToothSelection} />
<View direction={'row'} justify={'center'} className="responsive-container">
<View width="100%" direction={'column'} align="center">
<View align="center" width="100%">
<TeethDiagram toggleToothSelection={toggleToothSelection} />
</View>
<View
gap={10}
direction="row"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import Image from 'next/image';
import React from 'react';
import { View, Button } from 'reshaped';
import { useRouter } from "next/navigation";

Expand Down
11 changes: 11 additions & 0 deletions components/UI/ProstheticSelectionGuide/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@media (min-width: 900px) {
.responsive-container {
margin: 0px 24px 0px;
}
}

@media (min-width: 1280px) {
.responsive-container {
margin: 0px 124px 0px;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';

import React, { ChangeEvent, useState } from 'react';
import {
Text,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use-client";
"use client";

import Image from "next/image";
import {
Expand Down
1 change: 0 additions & 1 deletion components/UI/SelectedToothItems/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useRouter } from 'next/navigation';

export function SelectedToothItems({ params }: { params: any }) {
const router = useRouter()
const section = params.section;
const item = params.item;

const handleSelectItem = (questionIndex: number, optionIndex: number) => {
Expand Down
10 changes: 5 additions & 5 deletions components/UI/SideNavigationBar/SideNavigationBar.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use client';

import { SignedIn, SignedOut, SignInButton } from "@clerk/nextjs";
import { UserButton } from "@clerk/nextjs/app-beta";
import Image from "next/image";
import React from "react";
import { Avatar, Divider, View, MenuItem, Button, Icon } from "../../Reshaped/Reshaped";

export default function SideNavigationBar() {
Expand All @@ -27,7 +24,10 @@ export default function SideNavigationBar() {

<View height="100%" direction="column" justify="end" align="center" paddingTop={2} paddingBottom={2}>
<View width='64px' height='64px' align="center" justify="center">
<SignedOut>
<Button variant='ghost'>
<Avatar src="/User.svg" alt="Dechea" size={8} />
</Button>
{/* <SignedOut>
<SignInButton mode="modal">
<Button variant='ghost'>
<Avatar src="/User.svg" alt="Dechea" size={8} />
Expand All @@ -36,7 +36,7 @@ export default function SideNavigationBar() {
</SignedOut>
<SignedIn>
<UserButton />
</SignedIn>
</SignedIn> */}
</View>
</View>
</View>
Expand Down
4 changes: 3 additions & 1 deletion components/UI/__mock__/data.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use client';

import { Tooth11 } from '../../teeth-diagram/components/Tooth11';
import dynamic from 'next/dynamic';
import { View } from '../../Reshaped/Reshaped';

const Tooth11 = dynamic(() => import('../../teeth-diagram/components/Tooth11').then((comp) => comp.Tooth11), {ssr: false});

export const ImplantIcon = () => (
<View height="32px" width="32px" justify="center" align="center">
<Tooth11 implant artificial root={false} />
Expand Down
16 changes: 8 additions & 8 deletions components/teeth-diagram/TeethDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import {
lowerJawLeftTeeth,
lowerJawRightTeeth,
} from '@dechea/hes.constants.tooth-position';
import { Container, View } from 'reshaped';
import { View } from 'reshaped';
import { Teeth } from './components/Teeth';
import { TeethDiagramProps } from './types/types';

export const TeethDiagram = ({ toggleToothSelection }: TeethDiagramProps) => {
return (
<View direction="column" gap={5} align="center" divided>
<View direction="column" gap={5} align="center" divided maxWidth="1920px" width="100%">
{/* upper jaw */}
<View.Item columns={12}>
<View direction="row" gap={5} divided wrap={false}>
<View direction="row" gap={6} wrap={false}>
{/* Upper left */}
<View.Item columns={6}>
<View direction="row" gap={2} align="end" justify="end">
<View direction="row" gap={6} align="end" justify="end">
<Teeth
jawType="upper"
teeth={upperJawLeftTeeth}
Expand All @@ -30,7 +30,7 @@ export const TeethDiagram = ({ toggleToothSelection }: TeethDiagramProps) => {

{/* Upper right */}
<View.Item columns={6}>
<View direction="row" gap={2} align="end" justify="start">
<View direction="row" gap={6} align="end" justify="start">
<Teeth
jawType="upper"
teeth={upperJawRightTeeth}
Expand All @@ -43,10 +43,10 @@ export const TeethDiagram = ({ toggleToothSelection }: TeethDiagramProps) => {

{/* lower jaw */}
<View.Item columns={12}>
<View direction="row" gap={5} divided wrap={false}>
<View direction="row" gap={6} wrap={false}>
{/* Lower left */}
<View.Item columns={6}>
<View direction="row" gap={2} align="start" justify="end">
<View direction="row" gap={6} align="start" justify="end">
<Teeth
jawType="lower"
teeth={lowerJawLeftTeeth}
Expand All @@ -57,7 +57,7 @@ export const TeethDiagram = ({ toggleToothSelection }: TeethDiagramProps) => {

{/* Lower right */}
<View.Item columns={6}>
<View direction="row" gap={2} align="start" justify="start">
<View direction="row" gap={6} align="start" justify="start">
<Teeth
jawType="lower"
teeth={lowerJawRightTeeth}
Expand Down
2 changes: 1 addition & 1 deletion components/teeth-diagram/components/Teeth/Teeth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import React from 'react';
import { View } from 'reshaped';
import { teethMapping } from '../../teethMapping';
import { TeethProps, ToothProps } from '../../types/types';
import { teethMapping } from "../../teethMapping";

const Tooth = ({ tooth, ...props }: ToothProps) => {
const Tooth: React.FC = teethMapping[tooth as keyof typeof teethMapping];
Expand Down
Loading