+
+ Stellar Births
+
+
+
+
+
Name
+
Constellation Name
+
Creation Time
+
+
+ {
+ data?.map((item, index )=>- )
+ }
+
+
+
+
+
+ )
+}
+
+const Item = ({data}:any) =>{
+
+ return (
+
+
+
{data.star_name}
+
{getConstellation(data.transaction_id)}
+
{formatDateTime(data.time)}
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/html/SearchResults.tsx b/src/components/html/BottomPanel/SearchResults.tsx
similarity index 100%
rename from src/components/html/SearchResults.tsx
rename to src/components/html/BottomPanel/SearchResults.tsx
diff --git a/src/components/html/BottomPanel/index.tsx b/src/components/html/BottomPanel/index.tsx
new file mode 100644
index 0000000..18a1db3
--- /dev/null
+++ b/src/components/html/BottomPanel/index.tsx
@@ -0,0 +1,183 @@
+
+import useStore from '@/lib/store';
+import React, { useEffect, useRef, useState } from 'react'
+import Styles from "./styles.module.scss"
+import { supabase } from '@/lib/supabaseClient';
+import SearchResults from './SearchResults';
+import RecentTXNs from './RecentTXNs';
+import starData from "@/components/MyScene/Chunk/data.json"
+import Notifications from './Notifications';
+
+export default function BottomPanel({flag, changeFlag}:{flag:boolean, changeFlag(value:boolean):void}) {
+
+ const [results, setResults] = useState
(undefined)
+ const ref = useRef(null);
+ const [Observatory, setObservatory] = useState({stars:0, constellations:0, wallets:0})
+ const [recentTXNs, setRecentTXNs] = useState(undefined)
+ const [latestConstellations, setLatestConstellations] = useState([])
+ const names = starData.names
+ const tutorial = useStore((s)=>s.tutorial)
+ const tabs = useStore((s)=>s.tabs)
+
+ const fetchTableData = async (tableName: string, filter?: string) => {
+ try {
+ const { data, error } = await supabase.from(tableName).select('*').or(`transaction_signature.eq.${filter}, from_address.eq.${filter}`);
+ // 5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1
+ if (error) {
+ throw new Error(error.message);
+ }
+ return data;
+ } catch (error) {
+ console.error('Error fetching data:', error);
+ throw error;
+ }
+ };
+
+ const handleKeyDown = async (event: any) => {
+ if (event.key === 'Enter') {
+ if(event.target.value !== ""){
+ const data = await fetchTableData('transaction-data-updated', event.target.value)
+ setResults(data)
+ }
+ }
+ };
+
+ const changeInput = async (value: string) => {
+ if(value === ""){
+ setResults(undefined)
+ useStore.setState({choose:undefined})
+ }
+ };
+
+ const fetchDataForObservatory = async () =>{
+ try {
+ const { data, error } = await supabase.from("transaction-data-updated").select('*').order('transaction_id', { ascending: false });
+ // 5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1
+ if (error) {
+ console.log(error.message)
+ throw new Error(error.message);
+ }
+ if(data.length>0){
+ const stars = data.length
+ const constellations = Math.floor((stars-1)/5)+1
+ const temp : string[] = []
+ setRecentTXNs(data.slice(0, 15))
+ data.map((item)=>{
+ if(!temp.includes(item["from_address"]))
+ temp.push(item["from_address"])
+ })
+ const wallets = temp.length
+ setObservatory({stars, constellations, wallets})
+ const tempLatestConstellations : string[] = []
+ data.slice(0, 15).map((item)=>{
+ const k = Math.floor((item.transaction_id-1)/5)
+ if(!tempLatestConstellations.includes(names[k])){
+ tempLatestConstellations.push(names[k])
+ }
+ })
+ setLatestConstellations(tempLatestConstellations)
+ }
+ } catch (error) {
+ console.error('Error fetching data:', error);
+ throw error;
+ }
+ }
+
+ useEffect(() => {
+ fetchDataForObservatory()
+ }, []);
+
+ useEffect(()=>{
+ const handleClickOutside = (event: MouseEvent) => {
+ if (ref.current && !ref.current.contains(event.target as Node)) {
+ !tutorial && useStore.setState({tabs:0});
+ }
+ };
+ if(!tutorial){
+ document.addEventListener("mousedown", handleClickOutside);
+ return () => {
+ document.removeEventListener("mousedown", handleClickOutside);
+ };
+ }
+
+ },[tutorial])
+
+ const changeTabs = (value:number) =>{
+ useStore.setState({tabs:value})
+ }
+
+ return (
+
+
+
+
+
changeTabs(1)}>
+
+ Search
+
+
+
changeTabs(2)}>
+
+ Stellar Births
+
+
+
changeTabs(3)}>
+
+ Celestial Observatory
+
+
+
+
+
+ {
+ tabs === 1 ?
+
+
+ changeInput(e.target.value)}/>
+
+
+ : tabs === 3 ?
+
+
+
+
+ {Observatory.stars} Stars
+
+
+
+
+
+
+ {Observatory.constellations} Constellations
+
+
+
+
+
+
+ {Observatory.wallets} Cosmic Nurturers
+
+
+
+
+ :
+
+ }
+
+
+ {
+ latestConstellations?.length>0 &&
+ }
+
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/components/html/styles.module.scss b/src/components/html/BottomPanel/styles.module.scss
similarity index 58%
rename from src/components/html/styles.module.scss
rename to src/components/html/BottomPanel/styles.module.scss
index 1799ec4..5317b8c 100644
--- a/src/components/html/styles.module.scss
+++ b/src/components/html/BottomPanel/styles.module.scss
@@ -1,10 +1,10 @@
.bottomPanel {
// padding: 15px 0;
pointer-events: all;
- background-color: rgba(0, 0, 0, .95);
+ background-color: rgba(0, 0, 0, 1.0);
background-position: 1px -1px;
background-image: url('/assets/textures/texture.png');
- border-bottom: 1px solid #0c67a1;
+ border-top: 1px solid #0c67a1;
color: #0a5688;
// height: 40px;
width: 100%;
@@ -12,38 +12,39 @@
bottom:0;
transform: translateY(100%);
transition: all 0.5s;
- transition-timing-function: ease-in-out;
+ // transition-timing-function: ease-in-out;
+ z-index: 5;
.tabs{
width: 100%;
height: 40px;
position: absolute;
- top: -40px;
- // transform: translateX(100%);
- border-bottom: 1px solid #0c67a1;
+ right: -2px;
+ bottom: calc(100% + 3px);
display: flex;
justify-content: end;
.tab{
- height: 40px;
- background-color: rgba(0, 0, 0, .95);
+ height: 39px;
+ background-color: rgba(0, 0, 0, 1);
display: inline-block;
vertical-align: top;
text-align: left;
border-top: 1px solid #0c67a1;
+ border-bottom: 1px solid #0c67a1;
position: relative;
pointer-events: auto;
margin-top: 4px;
cursor: pointer;
- transition: all 0.5s;
+ // transition: all 0.5s;
&::before{
content: '';
position: absolute;
top: auto;
left: -41px;
- bottom: 4px;
+ bottom: 0px;
right: auto;
z-index: 2;
width: 6px;
- height: 36px;
+ height: 38px;
-webkit-transform: skewX(-45deg);
transform: skewX(-45deg);
-webkit-transform-origin: bottom left;
@@ -54,49 +55,93 @@
display: block;
width: 100%;
height: 36px;
- padding: 10px 51px 15px 15px;
+ padding: 10px 40px 15px 15px;
font-family: Orbitron, sans-serif;
- font-size: 9px;
+ font-size: 11px;
text-transform: uppercase;
letter-spacing: 1px;
color: #248bcf;
text-align: center;
- transition: all 0.5s;
&::before {
content: '';
position: absolute;
top: auto;
left: -36px;
bottom: 0;
+ border-style: solid;
+ border-width: 0 36px 36px 0;
+ border-color: transparent rgba(0, 0, 0, 1) transparent transparent;
+ -webkit-transform: scaleY(-1);
+ transform: scaleY(-1);
+ opacity: 1 !important;
+ }
+ &::after{
+ content: '';
+ position: absolute;
+ top: auto;
+ left: -36px;
+ bottom: 0;
+ right: 0;
+ width: 36px;
+ height: 36px;
+ background: url('/assets/textures/texture-corner.png') no-repeat;
+ opacity: 0;
+ // border-bottom: 1px solid #0c67a1;
+ }
+ }
+ }
+ .active{
+ height: 44px !important;
+ bottom:4px;
+ background-position: 1px 1px;
+ background-image: url('/assets/textures/texture.png');
+ border-right: 1px solid #0c67a1;
+ border-bottom: none !important;
+ z-index: 3;
+ &::before{
+ background-color: #42edf8 !important;
+ height: 42px;
+ bottom: 2px;
+ box-shadow: 4px 4px 10px rgba(0, 112, 202, .6), -4px -4px 10px rgba(0, 112, 202, .6), -4px 4px 10px rgba(0, 112, 202, .6), 4px -4px 10px rgba(0, 112, 202, .6);
+ }
+ .text{
+ font-weight: 700;
+ font-size: 12px;
+ color: #fee5a1;
+ opacity: .8;
+ padding: 10px 15px 15px 15px;
+ text-shadow: 4px 4px 10px rgba(255, 54, 0, .35), -4px -4px 10px rgba(255, 54, 0, .35), -4px 4px 10px rgba(255, 54, 0, .35), 4px -4px 10px rgba(255, 54, 0, .35);
+ &::before{
+ content: '';
+ top: auto;
+ left: -36px;
+ bottom: 0;
right: auto;
width: 0;
height: 0;
border-style: solid;
border-width: 0 36px 36px 0;
- border-color: transparent rgba(0, 0, 0, .95) transparent transparent;
+ border-color: transparent rgba(0, 0, 0, 1) transparent transparent;
-webkit-transform: scaleY(-1);
transform: scaleY(-1);
}
&::after{
- content: '';
- position: absolute;
- top: auto;
- left: -36px;
- bottom: 0;
- right: auto;
width: 36px;
height: 36px;
- background: url('/assets/textures/texture-corner.png') no-repeat;
- opacity: 0;
+ position: absolute;
+ right: 0 !important;
+ background-position: 1px 1px;
+ // background: url('/assets/textures/texture-corner.png') no-repeat;
+ opacity: 1 !important;
}
}
}
}
- .search{
+ .wrapper{
display: inline-block;
vertical-align: top;
position: relative;
- height: 60px;
+ // height: 60px;
-webkit-transform: skewX(45deg);
transform: skewX(45deg);
-webkit-transform-origin: bottom right;
@@ -105,7 +150,7 @@
-webkit-transition: background-color 150ms ease-out, color 150ms ease-out;
transition: background-color 150ms ease-out, color 150ms ease-out;
text-align: left;
- padding: 17px 40px;
+ padding: 14px 30px;
.inputContainter{
display: inline-block;
vertical-align: top;
@@ -130,52 +175,32 @@
display: block;
outline: none;
}
+ p{
+ padding: 4px 18px 3px 4px;
+ margin: 0;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ border: 0;
+ border-radius: 0;
+ background: 0 0;
+ font-family: Electrolize, sans-serif;
+ font-size: 11px;
+ text-transform: uppercase;
+ color: #42edf8;
+ width: 200px;
+ transform: skewX(-45deg);
+ -webkit-transform-origin: bottom right;
+ transform-origin: bottom right;
+ display: block;
+ outline: none;
+ }
}
}
}
.activePanel{
transform: translateY(0px);
- .tabs{
- .tab{
- background-color: rgba(0, 0, 0, .95);
- background-position: 1px 1px;
- background-image: url('/assets/textures/texture.png');
- &::before{
- background-color: #42edf8 !important;
- box-shadow: 4px 4px 10px rgba(0, 112, 202, .6), -4px -4px 10px rgba(0, 112, 202, .6), -4px 4px 10px rgba(0, 112, 202, .6), 4px -4px 10px rgba(0, 112, 202, .6);
- }
- .text{
- font-weight: 700;
- font-size: 12px;
- color: #fee5a1;
- opacity: .8;
- text-shadow: 4px 4px 10px rgba(255, 54, 0, .35), -4px -4px 10px rgba(255, 54, 0, .35), -4px 4px 10px rgba(255, 54, 0, .35), 4px -4px 10px rgba(255, 54, 0, .35);
- &::before{
- content: '';
- position: absolute;
- top: auto;
- left: -36px;
- bottom: 0;
- right: auto;
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 0 36px 36px 0;
- border-color: transparent rgba(0, 0, 0, .95) transparent transparent;
- -webkit-transform: scaleY(-1);
- transform: scaleY(-1);
- }
- &::after{
- width: 36px;
- height: 36px;
- background-position: 1px 1px;
- background: url('/assets/textures/texture-corner.png') no-repeat;
- opacity: 1 !important;
- }
- }
- }
- }
}
.searchResults{
@@ -212,6 +237,88 @@
text-overflow: ellipsis !important;
}
}
+
+.recentTXNs{
+ width: 500px;
+ height: auto;
+ position: absolute;
+ right: 0;
+ bottom: 150px;
+ color: #066c93;
+ // background-color: #010913F3;// rgba(1, 9, 19, .95);
+ // border: 1px solid #0c67a1;
+ text-align: left;
+ text-transform: uppercase;
+ padding-top: 3px;
+ min-width: 500px;
+ font-size: 11px;
+ font-family: Electrolize, sans-serif;
+ font-weight: 700;
+ transform: translateX(-10%);
+ transition: transform 0.5s;
+ .head{
+ position: relative;
+ width: 100%;
+ padding: 8px 0;
+ border-color: #0c67a1;
+ border-right: 1px solid;
+ font-size: 20px;
+ text-align: center;
+ z-index: 1;
+ overflow: hidden;
+ &::before{
+ content: '';
+ position: absolute;
+ width: 100%;
+ height: 47px;
+ border: solid 1px #0c67a1;
+ left: 23px;
+ bottom: -1px;
+ background-color: #010913F3;
+ z-index: -1;
+
+ transform: skewX(-45deg);
+ }
+ }
+ .th{
+ padding: 10px 15px;
+ border-right: 1px solid #0c67a1;
+ border-bottom: 1px solid #00304e;
+ }
+ .td{
+ padding: 10px 15px;
+ border-right: 1px solid #0c67a1;
+ strong{
+ color: #14ccfa;
+ }
+ border-bottom: 1px solid #00304e;
+ overflow: hidden;
+ text-overflow: ellipsis !important;
+ }
+ .footer{
+ position: relative;
+ width: 100%;
+ height: 20px;
+ border-color: #0c67a1;
+ border-left: 1px solid;
+ z-index: 1;
+ overflow: hidden;
+ &::before{
+ content: '';
+ position: absolute;
+ width: 100%;
+ height: 21px;
+ border: solid 1px #0c67a1;
+ left: -10px;
+ top: -1px;
+ background-color: #010913F3;
+ z-index: -1;
+
+ transform: skewX(-45deg);
+ }
+ }
+}
+
.hidden{
transform: translateX(100%);
}
\ No newline at end of file
diff --git a/src/components/html/MyContent.tsx b/src/components/html/MyContent.tsx
index 3cb12b0..1028834 100644
--- a/src/components/html/MyContent.tsx
+++ b/src/components/html/MyContent.tsx
@@ -1,12 +1,17 @@
import React, { useEffect, useState } from 'react'
-import SearchInput from './SearchInput'
import StarDetails from './StarDetails'
import BottomPanel from './BottomPanel'
+import TopPanel from './TopPanel'
+import Link from 'next/link'
+import Image from 'next/image'
+import TutorialPopup from './TutorialPopup'
+import useStore from '@/lib/store'
export default function MyContent() {
- const [searchFlag, setSearchFlag] = useState(false)
+ const [searchFlag, setSearchFlag] = useState(true)
+ const tabs = useStore((s)=>s.tabs)
const changeFlag = (value:boolean) =>{
setSearchFlag(value)
@@ -19,9 +24,39 @@ export default function MyContent() {
fill='#000000ea' stroke='#0c67a1' strokeWidth='2'
/>
*/}
+ {/* */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
)
diff --git a/src/components/html/SearchInput.tsx b/src/components/html/SearchInput.tsx
deleted file mode 100644
index 97d4dbd..0000000
--- a/src/components/html/SearchInput.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-
-import useStore from '@/lib/store';
-import React, { useEffect } from 'react'
-
-export default function SearchInput({changeFlag}:{changeFlag():void}) {
- const handleKeyDown = (event: any) => {
- if (event.key === 'Enter') {
- useStore.setState({search:event.target.value})
- }
- };
-
- return (
-
-
-
-
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/components/html/StarDetails.module.scss b/src/components/html/StarDetails.module.scss
new file mode 100644
index 0000000..db5fff3
--- /dev/null
+++ b/src/components/html/StarDetails.module.scss
@@ -0,0 +1,41 @@
+.head{
+ position: relative;
+ width: 100%;
+ height: 20px;
+ border-right: 1px solid #0c67a1;
+ z-index: 1;
+ overflow: hidden;
+ &::before{
+ content: '';
+ position: absolute;
+ width: 100%;
+ height: 21px;
+ border: solid 1px #0c67a1;
+ left: 10px;
+ bottom: -1px;
+ background-color: #010913F3;
+ z-index: -1;
+ transform: skewX(-45deg);
+ }
+}
+.footer{
+ position: relative;
+ width: 100%;
+ height: 15px;
+ border-left:1px solid #0c67a1;
+ z-index: 1;
+ overflow: hidden;
+ &::before{
+ content: '';
+ position: absolute;
+ width: 100%;
+ height: 16px;
+ border: solid 1px #0c67a1;
+ left: -8px;
+ top: -1px;
+ background-color: #010913F3;
+ z-index: -1;
+
+ transform: skewX(-45deg);
+ }
+}
\ No newline at end of file
diff --git a/src/components/html/StarDetails.tsx b/src/components/html/StarDetails.tsx
index d97a059..0cc1504 100644
--- a/src/components/html/StarDetails.tsx
+++ b/src/components/html/StarDetails.tsx
@@ -1,17 +1,18 @@
import useStore from '@/lib/store';
+import Link from 'next/link';
import React, { useEffect } from 'react'
+import Styles from "./StarDetails.module.scss"
+import { formatDateTime, getConstellation } from '@/lib/utils';
export default function StarDetails() {
const choose = useStore(s => s.choose)
const valueClass = "text-[#14ccfa] text-semibold text-[14px] capitalize leading-[16px] truncate"
return (
-
-
-