Skip to content

Commit

Permalink
Merge pull request #54 from shobensack/sh-pull-request
Browse files Browse the repository at this point in the history
Store current tab in local storage
  • Loading branch information
Gobluebro authored Jun 20, 2024
2 parents 82c062f + d3b6ef2 commit caf3419
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import type { NextPage } from "next";
import Head from "next/head";
import CompleteList from "../components/completeList";
import { useState } from "react";
import TabBar from "../components/tabBar";
import Footer from "../components/footer";
import MetaAndIcons from "../components/metaAndIcons";
import { TabNames } from "../data/tabs";
import { useLocalStorage } from "../hooks/useLocalStorage";

const Home: NextPage = () => {
const [currentTab, setCurrentTab] = useState<TabNames>(TabNames.Quests);
const [currentTab, setCurrentTab] = useLocalStorage(
"currentTab",
TabNames.Quests
);

return (
<div className="container flex flex-col min-h-screen mx-auto">
Expand Down

0 comments on commit caf3419

Please sign in to comment.