forked from hashgraph/hedera-smart-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added new UI components and reorganized routing logic (hashgrap…
…h#300) (hashgraph#301) * dapp-update: reworked protected routes logic protected routes are now nested under /hedera route Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-update: reworked layout logic Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-style: added z-index to gradient component Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-feat: added smart contact routes Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-feat: added LEFT_SIDE_BAR_ITEMS object Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-feat: added new LeftSideBar component Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * dapp-feat: new OverviewSection UI Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> --------- Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> Signed-off-by: Mo Shaikjee <shaikjeemohammed@gmail.com>
- Loading branch information
1 parent
84e92f7
commit d8d4b55
Showing
19 changed files
with
493 additions
and
62 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/erc-20/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const ERC20 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">ERC20</div> | ||
); | ||
}; | ||
|
||
export default ERC20; |
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/erc-721/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const ERC721 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">ERC721</div> | ||
); | ||
}; | ||
|
||
export default ERC721; |
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/exchange-rate-hip-475/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const HIP475 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">HIP475</div> | ||
); | ||
}; | ||
|
||
export default HIP475; |
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/hrc-719/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const HRC719 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">HRC719</div> | ||
); | ||
}; | ||
|
||
export default HRC719; |
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/hts-hip-206/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const HTS206 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">HTS206</div> | ||
); | ||
}; | ||
|
||
export default HTS206; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
import Navbar from '@/components/navbar'; | ||
import Footer from '@/components/footer'; | ||
import LeftSideBar from '@/components/leftSideBar'; | ||
|
||
export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<main className="flex flex-col min-h-screen"> | ||
<Navbar /> | ||
<div className="flex flex-1 px-6 overflow-x-hidden"> | ||
{/* <LeftSidebar /> */} | ||
<div> | ||
<LeftSideBar /> | ||
</div> | ||
{/* <Main children /> */} | ||
<div className="flex-1">{children}</div> | ||
|
||
{/* <RightSidebar /> */} | ||
<div> | ||
<div className="w-72" /> | ||
</div> | ||
</div> | ||
|
||
<Footer /> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
system-contract-dapp-playground/src/app/hedera/prng-hip-351/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
const HIP351 = () => { | ||
return ( | ||
<div className="text-white w-full flex justify-center items-center text-[3rem]">HIP351</div> | ||
); | ||
}; | ||
|
||
export default HIP351; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
system-contract-dapp-playground/src/components/leftSideBar/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
'use client'; | ||
|
||
/*- | ||
* | ||
* Hedera Smart Contracts | ||
* | ||
* Copyright (C) 2023 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
import Link from 'next/link'; | ||
import { motion } from 'framer-motion'; | ||
import { usePathname } from 'next/navigation'; | ||
import { LEFT_SIDE_BAR_ITEMS } from '@/utils/constants'; | ||
|
||
const LeftSideBar = () => { | ||
const pathname = usePathname(); | ||
|
||
return ( | ||
<motion.div | ||
initial={{ opacity: 0 }} | ||
whileInView={{ opacity: 1 }} | ||
transition={{ | ||
delay: 0.3, | ||
duration: 0.3, | ||
}} | ||
viewport={{ once: true }} | ||
className="w-72 h-full border-r border-white/30 text-white flex flex-col gap-3 pt-7 text-lg font-light tracking-tight leading-6 pr-2" | ||
> | ||
{LEFT_SIDE_BAR_ITEMS.map((item) => ( | ||
<Link | ||
key={item.name} | ||
href={item.path} | ||
className={`${ | ||
pathname.includes(item.path) && `bg-black/30 font-normal text-hedera-purple` | ||
} py-3 px-3 rounded-lg hover:bg-black/30 transition duration-300`} | ||
> | ||
{item.name} | ||
</Link> | ||
))} | ||
</motion.div> | ||
); | ||
}; | ||
|
||
export default LeftSideBar; |
Oops, something went wrong.