Skip to content

Commit

Permalink
🍭🪓 ↝ Dynamic route for explore/rover components, customising data gra…
Browse files Browse the repository at this point in the history
…phs [ SGV2-7 ]
  • Loading branch information
Gizmotronn committed Mar 14, 2024
1 parent a82142b commit e71b731
Show file tree
Hide file tree
Showing 7 changed files with 1,129 additions and 37 deletions.
46 changes: 23 additions & 23 deletions components/Content/Planets/Base/IndividualBasePlanet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ import { LightkurveBaseGraph } from "../PlanetData/ContentPlaceholder";
export function IndividualBasePlanetDesktop({ id }: { id: string }) {
const router = useRouter();

const supabase = useSupabaseClient();
const session = useSession();

const [planetData, setPlanetData] = useState(null);
const [planetPosts, setPlanetPosts] = useState([]);
const { id: planetId } = router.query;
const [hasPlanetInInventory, setHasPlanetInInventory] = useState(false);
const [inventoryPlanetId, setInventoryPlanetId] = useState<string | null>(
null
);
const [sectors, setSectors] = useState([]);

const [screenWidth, setScreenWidth] = useState<number>(0);
const [showSidebar, setShowSidebar] = useState<boolean>(true);
const supabase = useSupabaseClient();
const session = useSession();

// For handling selection of specific structures and then displaying content
const [selectedStructure, setSelectedStructure] = useState(null);
const [planetData, setPlanetData] = useState(null);
const [planetPosts, setPlanetPosts] = useState([]);
const { id: planetId } = router.query;
const [hasPlanetInInventory, setHasPlanetInInventory] = useState(false);
const [inventoryPlanetId, setInventoryPlanetId] = useState<string | null>(
null
);
const [sectors, setSectors] = useState([]);

const handleStructureClick = (structureName) => {
setSelectedStructure(planetId); // Set selectedStructure to planetId
};

const handleClosePopup = () => {
setSelectedStructure(null);
};
const [screenWidth, setScreenWidth] = useState<number>(0);
const [showSidebar, setShowSidebar] = useState<boolean>(true);

// For handling selection of specific structures and then displaying content
const [selectedStructure, setSelectedStructure] = useState(null);

const handleStructureClick = (structureName) => {
setSelectedStructure(planetId); // Set selectedStructure to planetId
};

const handleClosePopup = () => {
setSelectedStructure(null);
};

useEffect(() => {
const handleResize = () => {
Expand Down
Loading

0 comments on commit e71b731

Please sign in to comment.